-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
ZMS-[9x] Automatic API generation #535
Conversation
…one route in mailboxes.js and messages.js files so that the api docs generation can be done at all
… file. messages-schemas.js used for messages endpoint schemas
… response object there. Add response object parsing functionality to api.js
… remove unnecessary comments and logs
…ta and changes to endpoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Andris is in charge of all application logic, but I though my feedback could help here 😁
Should this maybe PR be marked as draft until it's actually ready?
…ive message and archive messages
…hemas for messages
…design. Use general schemas made earlier
…es.js fix response
ZMS-96 added all POST and GET endpoints in messages.js to API generation, but as the process of adding is extremely tedious and time consuming, it is better to import existing data from the current API docs and later on just add/remove data. |
For conversion from the old docs to openapi I also used an automatic process, with a lot of manual fixups afterwards :) |
Every endpoint should be (but doesn't have to, in which case it will be ignored) converted to a new format, that will allow the given endpoint to be used for automatic API generation if the endpoint is allowed to be included in API generation,
Data for every endpoint:
The object above ^ has to be the first parameter in the
server.get, server.post, server.put, server.del
function calls.tags, summary, description, operationId, requestBody, parameters, responses
alternatives
Joi typejs-yaml
package. Also as components are held in a separate JS object transform that object to YAML string as well.openapidocs.yml
)