micronaut-projects / micronaut-openapi

Generates OpenAPI / Swagger Documentation for Micronaut projects
https://micronaut-projects.github.io/micronaut-openapi/latest/guide/index.html
Apache License 2.0
80 stars 95 forks source link

Add support validation annotations extensions. #1789

Closed altro3 closed 1 month ago

altro3 commented 1 month ago

Add processing custom messages to jakarta validation annotations with extensions: x-pattern-message x-size-message x-not-null-message x-min-message x-max-message

sdelamo commented 1 month ago

can you merge 6.13.x ?

altro3 commented 1 month ago

This satisfies the specification because these are extensions.

The openapiGenerator core does not support these extensions, but for example x-pattern-message is supported by the spring generator: https://openapi-generator.tech/docs/generators/spring/

{E722B03A-BEF8-4070-8B4B-684781984953}

We are not obliged to support certain extensions, but we also have the right to create new extensions.

I added the rest of the extensions in connection with this PR: https://github.com/OpenAPITools/openapi-generator/pull/19630

In general, all these extensions are needed exclusively for more correct code generation. Support for new extensions does not affect the work of current users in any way, it simply adds the ability for them to describe the openapi specification so that the generated code is more accurate

altro3 commented 1 month ago

Unfortunately, I don't have time to write full documentation yet. You see, at the moment we don't have any documentation for the generator at ALL. Therefore, we need to write it not only about these extensions, but about the entire generator as a whole.

Therefore, I suggest not to bother with describing the generator features for now. I mean, specifically in these PRs, but in the future it will be time to write documentation for the generator. I was going to do this, but I haven't found the time yet

graemerocher commented 1 month ago

Please resolve the conflicts