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

kotlin ByteArray property incorrect #1688

Closed
codymikol opened this issue Jun 1, 2022 · 0 comments · Fixed by #1687
Closed

kotlin ByteArray property incorrect #1688

codymikol opened this issue Jun 1, 2022 · 0 comments · Fixed by #1687

Comments

@codymikol
Copy link

codymikol commented Jun 1, 2022

Describe the bug

  • If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible:
  • A clear and concise description of what the bug is: the title of an issue is not enough

When a model contains a ByteArray field, springdoc does not correctly generate a property definition.

currently this is generated

"properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "byte"
            }
          }
        }

When is should be

        "properties": {
          "data": {
            "type": "string",
            "format": "byte"
          }
        }

as per https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#data-types

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using?
  • What modules and versions of springdoc-openapi are you using?
  • What is the actual and the expected result using OpenAPI Description (yml or json)?
  • Provide with a sample code (HelloController) or Test that reproduces the problem

I've fixed it here already: #1687

I'm honestly happy to fix it myself, I just want to document the bug now so no one else gets stuck on it.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

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 a pull request may close this issue.

1 participant