Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@paragon
Copy link
Contributor

@paragon paragon commented Feb 1, 2025

The goal of this PR is to support the ability to specify either:

additionalProperties:
    type: string

...or...

patternProperties:
    "regex_expr":
        type: string

I've created a test case here that utilizes both additionalProperties and patternProperties and succeeds in creating the associated codegen. Most notably, the generated schema file (internal/integration/test_additionalpropertiespatternproperties/oas_schemas_gen.go) seems to be look good which (at least, to me) indicates things are behaving as expected.

I'm hoping this is the correct approach here. If not, I'd be happy to start a discussion on best approaches to facilitate supporting additionalProperties and patternProperties.

As an aside: it seems like based on prior discussions that there has been hesitation in supporting additionalProperties: true. As such, this PR does not aim to support it.

@ghost ghost enabled auto-merge February 7, 2025 12:05
@ghost ghost merged commit a1fb175 into ogen-go:main Feb 7, 2025
15 checks passed
This pull request was closed.
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.

1 participant