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

RAML Doc generator loses content type for file types #313

Open
stmeissner opened this issue Apr 25, 2024 · 1 comment
Open

RAML Doc generator loses content type for file types #313

stmeissner opened this issue Apr 25, 2024 · 1 comment

Comments

@stmeissner
Copy link

stmeissner commented Apr 25, 2024

Context

When I have a POST body of type file:

post:
  displayName: Upload an image
  queryParameters:
    filename:
      required: false
      type: string
      (builtinType): string
  headers:
    Content-Type:
      type: string
      (builtinType): string
      required: true
  body:
    type: file
    fileTypes:
      - "image/jpeg"
      - "image/png"
      - "image/gif"

Current behavior

The RAML Doc generator turns it to application/json:

  body:
    application/json:
      fileTypes:
        - "image/jpeg"
        - "image/png"
        - "image/gif"
      type: file
      (builtinType): file

Expected behavior

The type stays as it was:

  body:
    type: file
    fileTypes:
      - "image/jpeg"
      - "image/png"
      - "image/gif"
@stmeissner
Copy link
Author

I've found a workaround in the Docs Kit.

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

No branches or pull requests

1 participant