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][GO] "reflect" imported and not used #19968

Open
5 of 6 tasks
perhallgren opened this issue Oct 24, 2024 · 0 comments
Open
5 of 6 tasks

[BUG][GO] "reflect" imported and not used #19968

perhallgren opened this issue Oct 24, 2024 · 0 comments

Comments

@perhallgren
Copy link

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?
    Getting compilation error "reflect" imported and not used for generated file.
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Generated code for part of the 3GPP spec not compile.

openapi-generator version

7.10.0-SNAPSHOT

OpenAPI declaration file content or url
openapi: 3.0.0
info:
  version: '1.0.0'
  title: '-'
paths:
  /req:
    get:
      summary: Request
      operationId: Request
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Req'
            encoding:
              prop:
                contentType: application/json
      responses:
        '200':
          description: OK
components:
  schemas:
    Req:
      type: object
      properties:
        prop:
          type: array
          items:
            type: integer
Generation Details
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:latest generate \
        --input-spec /local/fail_schema.yaml \
        --generator-name go \
        --additional-properties "withGoMod=false" \
        --package-name gen \
        --output /local/gen_fail
Steps to reproduce

You can use this gist.

Related issues/PRs
Suggest a fix
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