OAI / learn.openapis.org

OpenAPI - Getting started, and the specification explained
https://learn.openapis.org/
Creative Commons Attribution 4.0 International
120 stars 60 forks source link

OpenAPI 3.1.0 petstore fixture #98

Open char0n opened 1 year ago

char0n commented 1 year ago

Hi,

I've noticed that OpenAPI 3.1.0 spec has various examples of usage: https://github.com/OAI/OpenAPI-Specification/tree/main/examples/v3.1

I was wondering if we can introduce OpenAPI 3.1.0 Petstore example that will be derived from OpenAPI 3.0.0 Petstore example and will demonstrate the main differences between 3.x.y and 3.1.0.

The motivation is to have some OpenAPI 3.1.0 complex example that people can look into or use it as default fixture in various tooling.

darrelmiller commented 1 year ago

That sounds like a great idea.

char0n commented 1 year ago

I'll issue a first draft PR to push this forward

dret commented 1 year ago

I was just hunting for an up-to-date petstore and was very surprised to find no such thing. It may not be the best example to highlight the differences, but it's just the classic example!

MikeRalphson commented 1 year ago

@dret @char0n my only slight concern here is, does the Petstore API itself expose anything which would make a v3.1 definition different to a v3.0 one? I can think of maybe exclusiveMinimum and exclusiveMaximum changes if they are present, but there are likely no webhooks or other features of JSON Schema 2020-12 needed...

petkostas commented 11 months ago

Do you happen to have any updates on this one, by chance? 3.1.x was rolled out some time ago and did introduce changes. It would be of value to have an updated example. Let us know if we can contribute here.

lornajane commented 11 months ago

We could alternatively adopt a different example for 3.1 since those exist. Unless we specifically want to stick with the petstore.

lornajane commented 6 months ago

Related: https://github.com/OAI/learn.openapis.org/issues/89

handrews commented 5 months ago

We are moving these examples to the learn.openapis.org site, so I am going to transfer this issue so it's easier to see what issues are for the separate examples like these and what are for the examples embedded in the spec. See this issue for the decision: