-
Notifications
You must be signed in to change notification settings - Fork 406
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
[gen] adding support for "Any" and "AnyObject" as json in codegen #3205
base: main
Are you sure you want to change the base?
[gen] adding support for "Any" and "AnyObject" as json in codegen #3205
Conversation
@@ -1077,7 +1078,10 @@ final case class EndpointGen(config: Config) { | |||
), | |||
) | |||
case JsonSchema.Null => throw new Exception("Null query parameters are not supported") | |||
case JsonSchema.AnyJson => throw new Exception("AnyJson query parameters are not supported") | |||
case JsonSchema.AnyJson => { | |||
// throw new Exception("AnyJson query parameters are not supported") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did we previously throw exception?
Am I breaking some other validation now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@987Nabil any idea regarding this one?
zio-http/shared/src/main/scala/zio/http/endpoint/openapi/JsonSchema.scala
Outdated
Show resolved
Hide resolved
eats: {} | ||
extra_attributes: | ||
type: object | ||
additionalProperties: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should also test for all the 3 out of 4 possible cases we handle?
extra_attributes:
type: object
additionalProperties: true
extra_attributes:
type: object
additionalProperties: {}
extra_attributes:
additionalProperties: true
extra_attributes: type: object additionalProperties: true extra_attributes: type: object additionalProperties: {} extra_attributes: additionalProperties: true but fails for this case, which might not be an issue (or an issue with zio-schema): extra_attributes: additionalProperties: {}
d4ef6d4
to
afe0bce
Compare
/fixes #3199
/claim #3199