Skip to content

Add ability to Include both json and yaml tags to the generated structs #1696

@MUzairS15

Description

@MUzairS15

How do we provide a custom template to have json and yaml tags to the generated structs?
I am aware that I can use x-oapi-codegen-extra-tags to add custom tags but it is tedious to add for each schema type.

It is common to encode/decode b/w json and yaml so it would be nice to have ability to add this common tags w/o needing to specify it explicitly.
Originally posted by @MUzairS15 in #1686

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions