question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ramondekleincommented, Dec 15, 2021

@spacether It now generates a proper body?: any again, so this seems to be fixed. Thanks for fixing this. 👍🏻

1reaction
spacethercommented, Dec 8, 2021

Thank you for reporting this; I have a PR to fix it in the works; waiting for tests to pass on it now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to get spring boot to automatically create database ...
Driver spring.datasource.url=jdbc:mysql://localhost:3306/test ... I have the src/main/resources/Schema.sql with DDL to create the database schema.
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug :1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to users, introduce a simple stability voting system and have a core...
Read more >
Troubleshooting Control Center | Confluent Documentation
To manage a license in the Control Center web interface, see Managing Confluent Platform Licenses in Control Center. A schema for message values...
Read more >
Important Upgrade Notes - Mattermost Documentation
Mattermost v7.1 introduces schema changes in the form of a new column and its ... While upgrading, it is required that no other...
Read more >
History of Changes - XMLBeans
XMLBEANS-567, Fix some problems with XMLBeans Extension Interfaces Feature ... update, XMLBEANS-610, Compiling XSD is slow since version 5.0.1 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found