Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #11401
Closed
Open
Issue created Jan 25, 2022 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG][Go][Bounty] Go client generator doesn't support deepObject in query

Created by: kamilsk

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

Go client generator doesn't support deepObject in query.

openapi-generator version

v5.3.1

OpenAPI declaration file content or url
openapi: 3.0.0

info:
  title: Example
  description: Example of deepObject failure.
  version: 1.0.0

paths:
  /test:
    get:
      operationId: test
      parameters:
        - name: filter
          in: query
          style: deepObject
          explode: true
          schema:
            type: object
            properties:
              search:
                description: Filter.
                type: string
      responses:
        '200':
          description: Response.
Generation Details
$ docker run --rm -it \
    -v "$(pwd)"/api.yaml:/specs/api.yaml \
    openapitools/openapi-generator-cli:v5.3.1 generate -i /specs/api.yaml -g go -o /sdk/go
Steps to reproduce
  1. store example in api.yaml
  2. run example from "generation details"

expected result: exit code 0 and successful generated content

actual result:

  Exception: null
        at org.openapitools.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:1175)
        at org.openapitools.codegen.DefaultGenerator.processPaths(DefaultGenerator.java:1066)
        at org.openapitools.codegen.DefaultGenerator.generateApis(DefaultGenerator.java:566)
        at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:907)
        at org.openapitools.codegen.cmd.Generate.execute(Generate.java:441)
        at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
        at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Caused by: java.lang.NullPointerException
Related issues/PRs
Suggest a fix
Assignee
Assign to
Time tracking