swagger-api / swagger-api/swagger-codegen

[golang] option to have non-primitive types as objects

Open
#8,777 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

After https://github.com/swagger-api/swagger-codegen/issues/2330 , all non-primitive types are pointers.

Is there an option that can be passed to not have non-primitive types be objects?

I was using 2.2.2 before, and that would make non-primitive types as objects.

Swagger-codegen version

2.3.1

Related issues/PRs

Seems like it was always pointer for non-primitive types from this issue:
https://github.com/swagger-api/swagger-codegen/issues/2330

Suggest a fix/enhancement

If no option can be passed to make it non pointer, then enhancement is wanted.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is identified in the issue. Review the non-primitive type behavior in Swagger-codegen 2.3.1 and the linked issue 2330 first, then determine where an option would belong. Done means users can choose non-pointer object types and the generated Go output reflects that choice.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.