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 release 3.1.0 #5

Open
kentmchenry opened this issue Feb 23, 2021 · 17 comments
Open

Support for OpenAPI release 3.1.0 #5

kentmchenry opened this issue Feb 23, 2021 · 17 comments

Comments

@kentmchenry
Copy link

There is a new release of OpenAPI (3.1.0). The regex for validating the version marks this as invalid.

https://github.com/OAI/OpenAPI-Specification/releases

@ak1394
Copy link
Contributor

ak1394 commented Feb 23, 2021

Thanks for the feedback! We plan to support 3.1.0 in the future versions of the extension, but supporting it requires more than simply fixing a version check. For instance we rely on OpenAPI JSON Schema to do the validation, which is not yet available for 3.1.0.

@ghost
Copy link

ghost commented Apr 26, 2021

Hi,
the components/pathItems is supported beginning 3.1 . Currently in plugin 1.13 it is not a valid entry.
(https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsObject)

This would greatly simplify the #ref to pathItem object in separate file. In 3.0 only a generic yaml object can be imported. But then the plugin support cannot be utilized on this yaml file.

Thanks for your great plugin

@ak1394
Copy link
Contributor

ak1394 commented Apr 27, 2021

Hi @Davetwo !

we surely would like to support 3.1, but something which is stopping us from doing it right now
is a support of JSON Schema 2020-12 in IntelliJ.

We use JSON Schemas provided by OpenAPI Initiative to do validation and completion, and the
schema for 3.1 is using newer JSON Schema 2020-12 format, which is as far as I know is not yet supported by IntelliJ.

@filipeamaral
Copy link

filipeamaral commented Jul 15, 2021

Apparently IntelliJ uses the schemas available at https://www.schemastore.org/json/.
Currently the latest JSON Schema version available is Draft 8, aka as 2019-09.
So the version missing is the 2020-12 one.

A PR to their GitHub repo would enable this 🙂

@ak1394 Would this do the trick?

@ak1394
Copy link
Contributor

ak1394 commented Jul 16, 2021

@filipeamaral unfortunately no, the new schema uses newer "JSON Schema 2020-12" dialect not yet supported by IntelliJ

@dan-j
Copy link

dan-j commented Aug 4, 2021

Does anyone know if there's an outstanding issue on the Jetbrains issue tracker to support 2020-12 schemas? I've tried searching but can't find anything

@ak1394
Copy link
Contributor

ak1394 commented Aug 4, 2021

I'm not sure there is visible issue on the tracker yet, so far we've contacted their support but haven't heard back yet.

@ak1394
Copy link
Contributor

ak1394 commented Aug 4, 2021

The issue in IntelliJ tracker is https://youtrack.jetbrains.com/issue/IDEA-275297

@ramilmsh
Copy link

ramilmsh commented Feb 7, 2022

@ak1394 maybe you could add a link to the issue tracker in the error message, so that people can like it and, thus, bump its priority

By error message I mean this one:

Unable to render this definition

The provided definition does not specify a valid version field.

Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0).

@AlexNik
Copy link

AlexNik commented May 19, 2022

We need 3.1 support for patternProperties.
OAI/OpenAPI-Specification#687 (comment)

@derekwsgray
Copy link

3.1.0 is now over a year old... is there really no way to validate these in the IDE?
Am I supposed to disable the JetBrains' bundled openapi plugin when using the 42crunch plugin?

@michellemay
Copy link

What is holding up here ? It's been more than two years. In our case, we are not relying on json schema for the models and use yaml instead. So I guess most of the previous comments are not applying to us.

May I propose to fix support for 3.1.0 for yaml files at least?

@ak1394
Copy link
Contributor

ak1394 commented Oct 24, 2023

Hi @michellemay ! Unfortunately, the JSON Schema support is central for the 3.1 support. We rely on the IDE to provide validation and auto completion for both JSON and YAML files. So even if you are using YAML, you still rely on JSON Schema.

@meden
Copy link

meden commented Nov 2, 2023

Unfortunately, the JSON Schema support is central for the 3.1 support. We rely on the IDE to provide validation and auto completion

@ak1394, what this does exactly mean? If the support has to be provided by the IDE, is this bug still valid? If it's not only about the IDE, what is needed to be done to have the support for OAS 3.1?

Moreover, it looks that json-schema-org.github.io has been archived on past Oct. 23, and all information are now available on https://json-schema.org/: what now?

As any user can add new JSON schemes in IDEA (in addition to the ones supported out-of-the-box), there is any workaround one could apply? Or could the plugin itself ship/setup the new schema? (This could come in handy for future version, eventually).

And a last question: how using JSON Schema 2020-12 can be enough, if OAS 3.1 is actually using a specific dialect? (Dialect already available on json-schema.org, BTW.)

Sorry for the many questions, but I hope they can somehow help to shed some light on this issue's status, and eventually to get to close it.

@ak1394
Copy link
Contributor

ak1394 commented Nov 2, 2023

Hi @meden ! Maybe I should have worded it a bit better, when I talk about "JSON Schema support" in the context of this ticket, I specifically mean the support for the "JSON Schema 2020-12" dialect of it.

OAS 3.1 uses this newer schema dialect which is not currently supported IntelliJ (see this ticket for details https://youtrack.jetbrains.com/issue/IDEA-275297), so this is the issue not the availability of the schemas itself.

Without editor support for this dialect, there is no point of support for 3.1 as things like autocompletion and validation will not work.

@meden
Copy link

meden commented Nov 6, 2023

@ak1394, thanks for the clarification. I guess then it's not enough to add a custom schema (as I actually tried to do), as it would have a more recent JSON schema-version directly supported in IDEA anyway, right?

image

@ak1394
Copy link
Contributor

ak1394 commented Nov 6, 2023

@meden Correct! See the details here https://youtrack.jetbrains.com/issue/IDEA-275297

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