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

Unsupported jsonSchemaDialect #588

Open
rocketraman opened this issue Mar 20, 2024 · 7 comments
Open

Unsupported jsonSchemaDialect #588

rocketraman opened this issue Mar 20, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@rocketraman
Copy link

Describe the bug
When using the Swagger UI, I see the following error:

Warning
OpenAPI.jsonSchemaDialect field contains a value different from the default value of https://spec.openapis.org/oas/3.1/dialect/base. Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.

Explicitly setting jsonSchemaDialect to the value shown works around the error, but I don't know whether that will break things.

Screenshots

image

@brizzbuzz
Copy link
Contributor

hmm... what version of swagger UI are you using, and what dialect do they expect?

@rocketraman
Copy link
Author

rocketraman commented Mar 20, 2024

hmm... what version of swagger UI are you using

I'm using the version Kompendium imports:

Judging by the code, it looks like the default is to pull the latest version:

val swaggerVersionSuffix = if (swaggerVersion == null) "" else "@$swaggerVersion"

script {
src = "https://unpkg.com/swagger-ui-dist$swaggerVersionSuffix/swagger-ui-standalone-preset.js"
}
script {
src = "https://unpkg.com/swagger-ui-dist$swaggerVersionSuffix/swagger-ui-bundle.js"
}

what dialect do they expect?

The dialect it expects is shown in the error message:

https://spec.openapis.org/oas/3.1/dialect/base

@brizzbuzz
Copy link
Contributor

I'm using the version Kompendium imports

Oh yea I forgot kompendium allows this again haha... swagger support for various openapi options always seems to be changing :/ Swagger UI is still on 5.x and previous 5.x versions worked w/ Kompendium but the swagger team doesn't really follow semver in my experience

Defaulting to latest is probably not the smartest move, from a compatibility perspective. Would be a very easy fix if we could publish the lib lol

@brizzbuzz brizzbuzz added the bug Something isn't working label Mar 20, 2024
@rocketraman
Copy link
Author

rocketraman commented Mar 20, 2024

I've got to figure out all the new Sonatype stuff for a library I publish so if I manage to get that working, maybe I can help you out with getting the publishing updated for Kompendium.

@brizzbuzz
Copy link
Contributor

Oh cool that would be great! That lib looks neat, I took a take a while back on a different aspect of the spring ecosystem, which was to start with a domain definition and try to code gen basically the entire backend out of it. The lib is in a super half baked state but does some pretty neat stuff with kotlin symbol processors :) https://github.com/bkbnio/lerasium

@anderssonw
Copy link

Are there any go to workarounds for this error for the time being? I can't see that it actually ruins anything, but its always a nice comfort having no errors on your swagger UI :)

@rocketraman
Copy link
Author

Are there any go to workarounds for this error for the time being? I can't see that it actually ruins anything, but its always a nice comfort having no errors on your swagger UI :)

As mentioned in the OP just set the jsonSchemaDialect property to the value shown in the error. It hasn't caused any issues for me so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants