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

[BUG] [Ada] Server skeleton does not compile when an operation has no parameter #8640

Closed
4 of 6 tasks
stcarrez opened this issue Feb 7, 2021 · 0 comments · Fixed by #8641
Closed
4 of 6 tasks

[BUG] [Ada] Server skeleton does not compile when an operation has no parameter #8640

stcarrez opened this issue Feb 7, 2021 · 0 comments · Fixed by #8641

Comments

@stcarrez
Copy link
Contributor

stcarrez commented Feb 7, 2021

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When an operation definition consumes an application/json without specific parameter,
the Ada skeleton that is generated does not compile.

The Ada skeleton is missing a use Swagger.Streams statement so it can be fixed by hand.

The Ada generated code also produces several compilation warnings that we can fix.

openapi-generator version

5.0 and 5.1

OpenAPI declaration file content or url

I put below an extract of such definition:

"put": {
  "operationId": "foo",
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "responses": { ... }
}
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix

I'll submit a pull request to fix this.

stcarrez added a commit to stcarrez/openapi-generator that referenced this issue Feb 7, 2021
…hen an operation has no parameter

- add missing 'use Swagger.Streams;' clause
- add Style_Checks pragma to fix style compilation warnings in generated Ada code
- fix spurious spaces in licence headers that cause Ada style compilation warning
- update the default GNAT project config
wing328 pushed a commit that referenced this issue Feb 8, 2021
…tion has no parameter (#8641)

- add missing 'use Swagger.Streams;' clause
- add Style_Checks pragma to fix style compilation warnings in generated Ada code
- fix spurious spaces in licence headers that cause Ada style compilation warning
- update the default GNAT project config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant