How to create swagger documentation? #7084
Replies: 4 comments 19 replies
-
|
I may be wrong, but doesn't Swagger use the Open API Spec? If so, you can use this: https://docs.directus.io/reference/api/system/server/#get-openapi-specification |
Beta Was this translation helpful? Give feedback.
-
|
I'm able to create a Swagger UI getting the import swaggerUi from 'swagger-ui-express';
import { EndpointRegisterFunction } from './types';
import * as swaggerDocument from './swagger.json';
const registerEndpoint: EndpointRegisterFunction = (router) => {
router.use('/', swaggerUi.serve);
router.get('/', swaggerUi.setup(swaggerDocument));
};
export default registerEndpoint;So, when I access |
Beta Was this translation helpful? Give feedback.
-
|
Hello guys, any update on the api/endpoint documentation automatically generated by Directus? Have nice holidays anyway |
Beta Was this translation helpful? Give feedback.
-
|
is there any news on this? Having an HTML page with the custom endpoints from the extensions described within the Directus panel would be incredibly helpful @benhaynes |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everybody,
Is there is a documented way to generate a Swagger interface for the APIs created by directus,
I do know that strapi cms dose it, wondering if I could do the same with directus?
Beta Was this translation helpful? Give feedback.
All reactions