Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

apply @NotNull bean-validation to allOf composition #72

Closed
hauner opened this issue Jun 20, 2021 · 3 comments · Fixed by #71
Closed

apply @NotNull bean-validation to allOf composition #72

hauner opened this issue Jun 20, 2021 · 3 comments · Fixed by #71
Milestone

Comments

@hauner
Copy link
Member

hauner commented Jun 20, 2021

"When using allOf and bean validation, the properties of the composed type do not get annotated with NotNull even though they are marked as required in the schema." See #71

@hauner hauner linked a pull request Jun 20, 2021 that will close this issue
hauner added a commit that referenced this issue Jun 20, 2021
hauner added a commit that referenced this issue Jun 20, 2021
hauner added a commit that referenced this issue Jun 20, 2021
@hauner hauner added this to the 2021.4.2 milestone Jun 20, 2021
hauner added a commit that referenced this issue Jun 20, 2021
@hauner
Copy link
Member Author

hauner commented Jun 20, 2021

@Tucos

It is fixed in core 2021.4.2. To use it with spring 2021.4, you can add the core library as an additional dependency.

in gradle:

openapiProcessor {
    // ...
    spring {
        // the spring processor dependency
        processor 'io.openapiprocessor:openapi-processor-core:2021.4.2'
        processor 'io.openapiprocessor:openapi-processor-spring:2021.4'
    }
}

with maven this should work:

<plugins>
  <plugin>
    <dependencies>
      <dependency>
        <groupId>io.openapiprocessor</groupId>
        <artifactId>openapi-processor-core</artifactId>
        <version>2021.4.2</version>
      </dependency>
      <dependency>
        <groupId>io.openapiprocessor</groupId>
        <artifactId>openapi-processor-spring</artifactId>
        <version>2021.4</version>
      </dependency>
    </dependencies>
  </plugin>
</plugins>

@hauner hauner closed this as completed Jun 20, 2021
@Tucos
Copy link
Contributor

Tucos commented Jun 21, 2021

Awesome, just adopted this version and verified it works as expected. I agree your fix is cleaner than the one I proposed. Thanks for the quick response and fix!

Very nice job on the project by the way, simple to use and a clean implementation that's quite easy to understand.

@hauner
Copy link
Member Author

hauner commented Jun 21, 2021

Nice to hear that it works as expected, and thanks for the praise :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants