-
Notifications
You must be signed in to change notification settings - Fork 413
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
Add APIv2 OpenAPI specification #1852
base: apiv2
Are you sure you want to change the base?
Conversation
`apiv2.yaml` is directly retrieved from Stoplight and can just be copy-pasted again when an update is needed in the future Needed to change the mode of the validator's refparser because the we reference the same file multiple times now
I think I will also mark API v1 endpoints as deprecated and change the tags |
Ready for review again |
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.
I think we should move (Deprecated) part to the beginning of titles. I went forward and done those myself, I'm guessing that's ok.
Otherwise I can't run it as is. I tried clearing the build cache etc. but I get the following output, (quite long so truncated)
},
{
"instancePath": "/paths/~1v2~1contracts~1{chainId}/get/responses/500/content/application~1json/schema",
"schemaPath": "#/properties/schema/oneOf",
"keyword": "oneOf",
"params": {
"passingSchemas": null
},
"message": "must match exactly one schema in oneOf"
},
{
"instancePath": "/paths/~1v2~1contracts~1{chainId}/get/responses/500",
"schemaPath": "#/definitions/Reference/required",
"keyword": "required",
"params": {
"missingProperty": "$ref"
},
"message": "must have required property '$ref'"
},
{
"instancePath": "/paths/~1v2~1contracts~1{chainId}/get/responses/500",
"schemaPath": "#/patternProperties/%5E%5B1-5%5D(%3F%3A%5Cd%7B2%7D%7CXX)%24/oneOf",
"keyword": "oneOf",
"params": {
"passingSchemas": null
},
"message": "must match exactly one schema in oneOf"
}
]
Also when I run the server and try to access any endpoint I get this:
Hm I cannot reproduce this. Just tried again with a clean install and build, and the server responds correctly as expected. Also the CI works. I can try again on Monday. |
Let's also see what @marcocastignoli has, maybe a Linux/MacOs thing. Can you build the branch and run the server? |
apiv2.yaml
is directly retrieved from Stoplight and can just be copy-pasted again when an update is needed in the future. Only if we add more endpoints we need to manually reference them inopenapi.yaml
due to limitations of the OpenAPI spec.Needed to change the mode of the validator's refparser because the we reference the same file multiple times now.
I'm not sure about the tags for the swagger documentation yet. Maybe we should add a "deprecated" to APIv1 instead of the "API v1" prefix?