Skip to content

Conversation

jmcarp
Copy link
Contributor

@jmcarp jmcarp commented Aug 28, 2025

When an openapi field includes an additionalProperties key, it represents a map to the type specified in the schema reference. We already correctly handle the special case of mapping a string to a slice of the referenced type as a map[string][]type, but not the case where the nested type isn't a slice. This patch adds logic for the missing map[string[type case.

@jmcarp jmcarp requested a review from a team as a code owner August 28, 2025 23:21
@jmcarp jmcarp force-pushed the jmcarp/map-string-object branch from 0dfcc88 to 8d42079 Compare August 29, 2025 18:54
When an openapi field includes an `additionalProperties` key, it represents a
map to the type specified in the schema reference. We already correctly handle
the special case of mapping a string to a slice of the referenced type as a
`map[string][]type`, but not the case where the nested type isn't a slice. This
patch adds logic for the missing `map[string[type` case.
@jmcarp jmcarp force-pushed the jmcarp/map-string-object branch from 8d42079 to 1649b1e Compare August 29, 2025 18:58
Copy link
Collaborator

@sudomateo sudomateo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! We'll bump the Omicron version in a future commit which will bring in the new []Timeseries type.

@sudomateo sudomateo merged commit 3e0eed0 into main Aug 29, 2025
1 check passed
@sudomateo sudomateo deleted the jmcarp/map-string-object branch August 29, 2025 19:32
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.

3 participants