httpbin icon indicating copy to clipboard operation
httpbin copied to clipboard

fix: OpenAPI spec invalid

Open jspdown opened this issue 2 years ago • 3 comments

This PR fixes the generated OpenAPI spec document to be v2.0 compliant.

The most important changes are the removal of the deprecated/non-standard SmartAPI fields responsibleOrganization and responsibleDeveloper. And the removal of the non-standard protocol field at the top level.

These fields alone prevented the use of HTTPBin spec on most OAS compliant tooling.

jspdown avatar Sep 27 '23 10:09 jspdown

Are all those "required" additions really "required"? Note that I've only quickly squinted at this MR through the prism of the "diff" so I am missing some context. The int/number change looks definitely correct though.

nb: You might want to move this PR over to https://github.com/psf/httpbin

exhuma avatar Sep 27 '23 17:09 exhuma

@exhuma Thanks for your feedback.

The Parameter object defined in the OAS v2 specification has a special requirement when the type of a parameter is path:

If the parameter is in "path", this property is required and its value MUST be true.

https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#fixed-fields-7

About psf/httpbin, I wasn't aware of this fork. I will make sure to submit the PR there as well.

jspdown avatar Oct 02 '23 07:10 jspdown

Checking the PRs there, could you please send it to the fork, too?

immanuelfodor avatar Oct 12 '23 16:10 immanuelfodor