-
Notifications
You must be signed in to change notification settings - Fork 256
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
Openapi fixes/enhancements #2102
Conversation
servers: | ||
- url: "%domjudge.baseurl%api" | ||
description: API used at this contest | ||
- url: https://domjudge.org/demoweb/api |
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.
This needs www.
in front of it
@@ -1,9 +1,43 @@ | |||
nelmio_api_doc: | |||
documentation: | |||
tags: | |||
- name: "Access" |
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.
The "
are not needed here.
@@ -1,9 +1,43 @@ | |||
nelmio_api_doc: | |||
documentation: | |||
tags: |
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.
Would be better/cool if we can write some event listener or compiler pass to add this based on the actual tags in all files so we don't repeat ourself.
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.
Yes, It might be nice if this just comes with NelmioDoc. I've checked and this is actually only optional so I think we can take this out for now.
This endpoint is optional, but it makes sense to link so people can build a tool against the stable version (their instance) and the new API on demoweb.
There is the risk that people will now ask help about an instance in the wild but I suspect API users will be aware how this works.
Even the original commit seemed to not link to this.
It was recommended by Spectral and makes sense to expose this information also to systems interacting via the API.
36ef202
to
24793be
Compare
Found by spectral, for all the rules see:
https://docs.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules
It also looks like our API is not OpenAPI3 complaint as we output the type
int
instead ofinteger
. This should be a bug with how we generate the docs.I think reviewing should be done by checking which commits to cherry-pick.