-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: ability to add Entity properties that related to Open API #360
Comments
Can you give an example of what kind of data should be added this way? |
Let's say I want to add: summary, description, servers (dev / staging / prod), externalDocs, or to mention additional body or headers to the requests that aren't mentioned inside the entity (like a middleware that checks different kind of authentication methods that running outside of remult). |
You can do that today, by extending remult EntityOptions etc.... see: And then process the openApi json file before sending it to swagger: const openApiDocument = api.openApiDoc({ title: "remult-react-todo" });
// --> process the json here. to add what you want based on the options you extend
app.get("/api/openApi.json", (req, res) => res.json(openApiDocument));
app.use('/api/docs', swaggerUi.serve, swaggerUi.setup(openApiDocument)); |
consider this ability on an entity:
what do you think?
The text was updated successfully, but these errors were encountered: