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 proper mapping of the byte array #4659

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Conversation

frantuma
Copy link
Member

@frantuma frantuma commented Apr 19, 2024

Includes and replaces #3955

Closes #3944 and #3511.

See also swagger-api/swagger-parser#1630

It introduces binary-string-conversion env or system variable, allowing to define behavior for resolution and conversion of byte arrays:

binary-string-conversion = base64 : resolves into ByteArraySchema/BinarySchema using Base64 for casting/conversion
binary-string-conversion = string-schema : resolves into StringSchema

@frantuma frantuma merged commit 616350b into master Apr 19, 2024
6 checks passed
@frantuma frantuma deleted the support.byte.array.rebased branch April 19, 2024 12:26
@frantuma frantuma self-assigned this Apr 19, 2024
@RInverid
Copy link

@frantuma Cool! one question: my current workaround for this issue is to annotate all endpoints returning byte[] as returning byte. Is this change compatible with this workaround? or will I need to pay attention when upgrading to the next version?

thanks a lot

@frantuma
Copy link
Member Author

@RInverid it should be ok

@spulci
Copy link

spulci commented May 14, 2024

@frantuma When we can expect this PR to be included in the next release?

Thanks

Simone

@frantuma
Copy link
Member Author

@spulci released 2.2.22

timonback added a commit to springwolf/springwolf-core that referenced this pull request May 24, 2024
sam0r040 pushed a commit to springwolf/springwolf-core that referenced this pull request May 24, 2024
* ---
updated-dependencies:
- dependency-name: io.swagger.core.v3:swagger-core-jakarta
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.swagger.core.v3:swagger-annotations-jakarta
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.swagger.core.v3:swagger-models-jakarta
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.swagger.core.v3:swagger-annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* deps(swagger-core): update schema for byte[]

Original change: swagger-api/swagger-core#4659

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Timon Back <timonback@users.noreply.github.com>
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.

Default mapping of java byte array
5 participants