-
Notifications
You must be signed in to change notification settings - Fork 11
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
Serve swagger file as JSON instead of YAML #1416
Comments
@davidyuk you should now be able to use https://mainnet.aeternity.io/mdw/v2/api?format=json or the legacy https://mainnet.aeternity.io/mdw/swagger/swagger.json from V1 |
Do you need yaml served at https://mainnet.aeternity.io/mdw/v2/api in some case? |
For backwards compatibility now we are not able to change it |
Is there a place where JSON can't be used instead of YAML?
|
It would still break those clients that are expecting a YAML under that path |
yep, but every JSON is a valid YAML document, does somebody have a self-written yaml parser that not based on the yaml spec? |
@davidyuk I wasn't really sure the standard covered entirely every json file, but you're right. I'll try updating it and if anyone complains we can revert it back |
All valid JSON files are also YAML files refs #1416
All valid JSON files are also YAML files refs #1416
All valid JSON files are also YAML files refs #1416
All valid JSON files are also YAML files refs #1416
Thank you! Sorry if I'm being too scrupulous |
Added and deployed |
Before I asked to add "/api" endpoint in consistency with the node and compiler. It has been done. The only issue that remains is the format of the swagger file. In node and compiler, it is plain JSON, but in middleware it is YAML. While there is no difference for most tools working with swagger files, YAML is not supported out-of-the-box in browsers. So serving "/api" as JSON would be more friendly for web developers, the same as it would be consistent with node and compiler. Switching from YAML to JSON is not a breaking change because YAML is a superset of JSON.
https://mainnet.aeternity.io/mdw/api vs https://mainnet.aeternity.io/api?oas3
The text was updated successfully, but these errors were encountered: