Skip to content

Missing request body parameters for plain/text #347

@arpanrec

Description

@arpanrec

Describe the bug
requestBody with content: plain/text is missing in generated file

Minimal reproduction
OpenAPI

  /cryptpass/api/v1/unlock:
    post:
      tags:
      - Perpetual
      summary: Unlock Application
      description: Unlocks the CryptPass application by providing the master encryption key. This endpoint is required to enable access to encrypted data after startup. Returns internal encryption key details (not the actual key).
      operationId: unlockApplication
      requestBody:
        description: Unlock key.
        content:
          plain/text:
            schema:
              type: string
        required: true

generated code

    {
        method: 'post',
        path: '/cryptpass/api/v1/unlock',
        alias: 'unlockApplication',
        description: `Unlocks the CryptPass application by providing the master encryption key. This endpoint is required to enable access to encrypted data after startup. Returns internal encryption key details (not the actual key).`,
        requestFormat: 'json',
        response: z.object({ success: z.boolean() }).passthrough(),
        errors: [
            {
                status: 400,
                description: `Bad request: initialization failed.`,
                schema: ErrorDetails,
            },
            {
                status: 500,
                description: `Internal server error.`,
                schema: ErrorDetails,
            },
        ],
    },

Expected behavior

{
        method: 'post',
        path: '/cryptpass/api/v1/unlock',
        alias: 'unlockApplication',
        description: `Unlocks the CryptPass application by providing the master encryption key. This endpoint is required to enable access to encrypted data after startup. Returns internal encryption key details (not the actual key).`,
        requestFormat: 'text',
        response: z.object({ success: z.boolean() }).passthrough(),
        parameters: [
            {
                name: 'body',
                description: `Unlock key.`,
                type: 'Body',
                schema: z.string(),
            },
        ],
        errors: [
            {
                status: 400,
                description: `Bad request: initialization failed.`,
                schema: ErrorDetails,
            },
            {
                status: 500,
                description: `Internal server error.`,
                schema: ErrorDetails,
            },
        ],
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions