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

Add JsonSchema fields #69

Merged
merged 3 commits into from
May 30, 2023

Conversation

hamnis
Copy link
Contributor

@hamnis hamnis commented May 26, 2023

  • Move ResourcePlatform to test-helper sbt-project
  • Add tests to jsonschema-circe

Fixes #60 and #56

- Move ResourcePlatform to test-helper sbt-project
- Add tests to jsonschema-circe
@hamnis
Copy link
Contributor Author

hamnis commented May 27, 2023

mima fails as expected

@adamw
Copy link
Member

adamw commented May 28, 2023

cc @kciesielski I think that's related to your recent work on schemas

@kciesielski
Copy link
Member

Thank you for the contribution, @hamnis! OpenAPI uses JSON Schema with some differences, for example $id and const fields are unsupported. Breaking mima by adding these fields would cause runtime errors for .copy calls on Schema if they are not added to the very end of the constructor. However, if you could move them after the extensions field, there should be no issues, at least from what I've quickly checked in my tests. Mima still fails, but copy works in the runtime, so I don't see any more risks, unless you could point some other possible issues I can't think of now?

@hamnis
Copy link
Contributor Author

hamnis commented May 30, 2023

@kciesielski i have updated with the requested changes, Please have a look again.

@kciesielski kciesielski merged commit e48adc0 into softwaremill:master May 30, 2023
@hamnis hamnis deleted the more-jsonschema-fields branch May 30, 2023 10:48
@ahjohannessen
Copy link

Scala-steward opened a PR to upgrade apispec-model and openapi-circe-yaml to v0.4.0 and I am getting:

Exception in thread "io-compute-6" java.lang.NoSuchMethodError: 'sttp.apispec.Schema sttp.apispec.Schema.copy(scala.Option, scala.collection.immutable.List, scala.Option, scala.collection.immutable.List, scala.Option, scala.Option, scala.Option, scala.Option, scala.collection.immutable.ListMap, scala.collection.immutable.ListMap, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.collection.immutable.List, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, scala.collection.immutable.ListMap)

@adamw
Copy link
Member

adamw commented May 30, 2023

@ahjohannessen a tapir release compatible with the above follows shortly - assuming you also have tapir in the classpath.

@ahjohannessen
Copy link

@adamw Yep 👍

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

Successfully merging this pull request may close these issues.

Add missing properties from jsonschema
4 participants