Skip to content

kotlin ByteArray property incorrect #1688

Closed
@codymikol

Description

@codymikol

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions