Skip to content

[BUG] Empty schema not working anymore since v5.3.0 #11052

@ramondeklein

Description

@ramondeklein

Suppose I have a method that accepts any input in the body:

---
openapi: 3.0.1
info:
  title: TEST
  version: v1
servers:
- url: http://localhost/
paths:
  "/":
    put:
      operationId: test
      parameters: []
      requestBody:
        content:
          application/json:
            schema: {}
      responses:
        '204':
          description: Success

When using the typescript-angular converter, this resulted in the following method in default.service.ts (using v5.2.1):

public test(body?: any, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<any>;

When using v5.3.0 the following method is generated:

public test(UNKNOWN_PARAM_NAME?: , observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable<any>;

No warnings are issued during code-generation and it's not related to the Typescript generator, because it also generates similar code for the C# and Java generators (all invalid syntax).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions