X Tutup
Skip to content

Use existing struct for additionalProperties that ref a schema#36

Merged
deepmap-marcinr merged 1 commit intooapi-codegen:masterfrom
imjoshholloway:master
Jul 17, 2019
Merged

Use existing struct for additionalProperties that ref a schema#36
deepmap-marcinr merged 1 commit intooapi-codegen:masterfrom
imjoshholloway:master

Conversation

@imjoshholloway
Copy link
Contributor

Right now, when a component is specified with

additionalProperties:
  $ref: '#/components/schemas/SomeSchema

The generated code produces a map with an anonymous struct: map[string]struct which includes all the fields the referenced schema contains. This PR switches it so the generated code uses the named struct: map[string]SomeSchema.

@deepmap-marcinr deepmap-marcinr merged commit 1de29b3 into oapi-codegen:master Jul 17, 2019
@deepmap-marcinr
Copy link
Contributor

Thank you for fixing this, that code is tricky.

adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
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

X Tutup