Skip to content
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

Support for OpenAPI 3.1.0 #755

Closed
harryc9 opened this issue Sep 8, 2022 · 13 comments
Closed

Support for OpenAPI 3.1.0 #755

harryc9 opened this issue Sep 8, 2022 · 13 comments

Comments

@harryc9
Copy link

harryc9 commented Sep 8, 2022

Hi, are there plans to support OpenAPI 3.1.0 with this library?

We're currently running into issues when validating the API spec because Stoplight API exports are using features exclusive to 3.1.0. Mainly trying to avoid workarounds where we manually downgrade the OA version and remove the said block post-export.

The specific feature being a change to the Schema definition to contain examples

components:
  schemas:
    User:
      title: User
      type: object
      description: ''
      examples:
        - id: 0
          firstName: Bob
          lastName: Ross
          email: [email protected]
          emailVerified: true
          createTime: '2019-08-24T12:42:12Z'
          lastUpdateTime: '2020-09-23T08:17:41Z'

Thank you!

@nd-jharn
Copy link

It seems they have done the work, but have not yet released it as an update:
#713

@essential-randomness
Copy link

OpenAPI 3.1 support is blocked on AJV implementing it, even if this library updates: OAI/OpenAPI-Specification#2689

@OlivierCuyp
Copy link

@essential-randomness would it possible to have a version that works without $dynamicAnchor and $recursiveAnchor ?
With a big warning on the main page about this ?
I'm missing so much null type and unevaluatedProperties for composition with allOf.

@essential-randomness
Copy link

Ah, man, I wish. There may be some movement on the AJV issue since yesterday, and if I understand correctly they offered a bounty. As far as my exploration went, I don't think it's possible to do anything about this without the AJV issue being resolved.

@OlivierCuyp
Copy link

@essential-randomness sorry, I didn't dig into the implication of $dynamicAnchor and $recursiveAnchor.
I was just hoping it was ad hoc features...
And yes, I saw this 500-1000$ bounty. Hopefully it will create some movement around this AJV issue.
It is so sad, OpenApi 3.1 has exactly all the features needed to do good composition and type validation.

@OlivierCuyp
Copy link

@essential-randomness I'm really curious, it seems that fastify-openapi-glue succeed to have the openapi 3.1.0 specification working:
seriousme/fastify-openapi-glue#178

To be honest I didn't test it but according to some colleagues, it works well.
Maybe they found a valid workaround.

@essential-randomness
Copy link

From there:

 3.1, by converting $dynamicRef and $dynamicAnchor into $ref and $anchor for now. This might cause some limitations for now but I think thats worth it.

I have no idea of the implications of this, nor would know what this conversion entails, but this is how they seem to be doing it.

@nexsodev
Copy link

Still nothing?

@lhimstedt
Copy link

lhimstedt commented May 23, 2023

It would be cool to have features like unevaluatedProperties from draft 2019-9. I tried to change the draft, but I may need to spend more time if nothing happens on this issue.

@cdimascio Is this update on the roadmap?

@Jackman3005
Copy link

I think this is a duplicate of this issue.

@Jackman3005
Copy link

As I posted about on the above issue, is it possible for this library to take on the preprocess step to resolve $dynamicRef before calling out to AJV? If not, would it be possible to provide a solid reason why it belongs in AJV to respond and continue pushing this forward?

@thernstig
Copy link

This is a duplicate of #573

@cdimascio
Copy link
Owner

Closing this in favor of the duplicate: #573

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants