Skip to content

feat(openapi3gen): Customize json.RawMessage#1050

Merged
fenollp merged 2 commits into
getkin:masterfrom
kyleconroy:kyle/allow-json-raw-message-customization
Feb 3, 2025
Merged

feat(openapi3gen): Customize json.RawMessage#1050
fenollp merged 2 commits into
getkin:masterfrom
kyleconroy:kyle/allow-json-raw-message-customization

Conversation

@kyleconroy

Copy link
Copy Markdown
Contributor

Using a SchemaCustomizer, I can't configure schemas for json.RawMessage fields. If I have the following struct

type Foo struct {
    Bar string `json:"bar"`
    Output json.RawMessage `json:"output"`
}

The schema customization function will only be called for the Bar field, not the Output field.

@kyleconroy

Copy link
Copy Markdown
Contributor Author

@fenollp please let me know if this is something you'd consider merging. Thanks!

@fenollp

fenollp commented Jan 29, 2025

Copy link
Copy Markdown
Collaborator

Please add tests.

@kyleconroy

Copy link
Copy Markdown
Contributor Author

Tests added

@fenollp fenollp merged commit 72fb819 into getkin:master Feb 3, 2025
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.

2 participants