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][Go][Bounty] Go client generator doesn't support deepObject in query

See original GitHub issue

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

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
wing328commented, Nov 20, 2022

Fixed via https://github.com/OpenAPITools/openapi-generator/pull/13909. Thanks @parvit for the PR.

@altitude Can you please pull the latest master to give it a try and send @parvit the bug bounty if the fix is good? Thanks.

1reaction
parvitcommented, Oct 8, 2022

Hi all, i’ve created a PR for this feature, please review it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Golang OpenAPI generator wraps query parameters into an ...
Long story short, the Golang generator adds a layer of wrapping for the query parameters I specify while the Java generator does not....
Read more >
sagnikrayc/quasar · Datasets at Hugging Face
Works but is not really nice .", "Question : When I attempt to generate an endpoint client library in Eclipse GPE 3.5.1 GAE...
Read more >
Blog | HHVM
We're happy to announce that the Nix packages of HHVM are now available, as is the public CI status on GitHub Actions for...
Read more >
AI War 2:The Great Refactor - Arcen Wiki
Fixed an issue where MP clients did not have appropriate strength ... on the World_AIW2 object, which lets us query some things in...
Read more >
Microsoft Online Services Bug Bounty Program Launches
“The aim of the bug bounty is to uncover significant vulnerabilities that have a direct and demonstrable impact to the security of our...
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