Skip to content

Generator: x-oapi-codegen-extra-tags does not work in the parameters definition #1445

@kukymbr

Description

@kukymbr

What version of ogen are you using?

v1.2.2, v1.10.1

Can this issue be reproduced with the latest version?

Yes

What did you do?

Added the x-oapi-codegen-extra-tags field into the parameters definition:

paths:
  /some/path:
    post:
      parameters:
        - $ref: "#/components/parameters/URL"
       # <...>
components:
  parameters:
    URL:
      name: url
      in: query
      schema:
        type: string
        x-oapi-codegen-extra-tags:
          validate: uri

What did you expect to see?

Tag added to the parameter field:

type Params struct {
	URL string `validate:"uri"`
}

What did you see instead?

No tag was added:

type Params struct {
	URL string
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions