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][JAVA-WIREMOCK] response code ranges are not supported #17723

Open
5 of 6 tasks
martin-mfg opened this issue Jan 27, 2024 · 0 comments
Open
5 of 6 tasks

[BUG][JAVA-WIREMOCK] response code ranges are not supported #17723

martin-mfg opened this issue Jan 27, 2024 · 0 comments

Comments

@martin-mfg
Copy link
Contributor

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

In the java-wiremock generator, response codes like "4XX" lead to uncompilable output.
The spec says such response codes are valid.

example spec
openapi: 3.0.3
info:
  version: 1.0.0
  title: OpenAPI Petstore
paths:
  /:
    get:
      responses:
        4XX: # this causes problems
          description: client error

Compiling the generated output results in

[ERROR] src/main/java/org/openapitools/mockserver/api/DefaultApiMockServer.java:[17,30] ')' expected
[ERROR] src/main/java/org/openapitools/mockserver/api/DefaultApiMockServer.java:[17,32] ';' expected
openapi-generator version

latest master

Generation Details

use generator "java-wiremock", with no additional settings

Related issues/PRs

originally discovered in #17614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant