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

Use lower-cased x-go-name for parameters var name #574

Merged
merged 2 commits into from May 17, 2022

Conversation

emilekm
Copy link
Contributor

@emilekm emilekm commented May 15, 2022

Small change to how variable names are generated (a follow up to a comment on my previous MR and extension to it).

components:
  parameters:
    PetID:
      name: pet_id
      x-go-name: PetID
      in: path
      schema:
        type: string
      required: true

Before:

func (c *ClientWithResponses) UpdatePetWithResponse(ctx context.Context, petId PetID,  ...)

Now:

func (c *ClientWithResponses) UpdatePetWithResponse(ctx context.Context, petID PetID,  ...)

@emilekm
Copy link
Contributor Author

emilekm commented May 15, 2022

Breaks compatibility, I'll look into doing this differently.

@emilekm emilekm changed the title Use lower-cased schema GoType name for parameters var name Use lower-cased x-go-name for parameters var name May 15, 2022
@deepmap-marcinr deepmap-marcinr merged commit 42f4388 into deepmap:master May 17, 2022
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
* Use lower-cased schema GoType name for parameters var name

* Override GoName with x-go-name extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants