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 support for type string with format binary #231

Merged

Conversation

ascheja
Copy link
Contributor

@ascheja ascheja commented Aug 31, 2023

Right now trying to specify a schema like {"type": "string", "format": "binary"} falls back to kotlin.String.

The binary format is one of the string formats defined by the openapi specification, used mostly for describing endpoints accepting/returning files.

The last commit is actually optional. JsonOverlay encodes / as ~1 before joining the path together with /, which leads to a strange to read parameter name like application1octetStream.

@@ -0,0 +1,24 @@
openapi: 3.0.1
Copy link
Owner

@cjbooms cjbooms Aug 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we tack this example on to an existing test case rather than creating a new example?
By just adding an additional format binary property to one single test case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, which one do you want it added to? From what I can see there are 5 files that currently generate controller code for both spring and micronaut:

  • githubApi
  • singleAllOf
  • authentication
  • parameterNameClash
  • pathLevelParameters

Based on that I don't think it really fits anywhere?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will merge as-is

@cjbooms cjbooms merged commit e589ae6 into cjbooms:master Sep 1, 2023
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.

2 participants