OpenAPITools / OpenAPITools/openapi-generator
[BUG][java-helidon-server] exclusiveMinimum is not respected in validation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
The exclusiveMinimum flag on a schema is ignored for the generated code. Using the linked spec, the generated validation code is
validator.validateMin("count", count, 0, true);, however the expected result would be validator.validateMin("count", count, 0, false);
openapi-generator version
7.8.0 gradle plugin
OpenAPI declaration file content or url
Generation Details
Generated via the gradle plugin
openApiGenerate {
generatorName.set("java-helidon-server")
inputSpecRootDirectory.set("$rootDir/specs/")
outputDir.set("$rootDir/src")
apiPackage.set("my.package.api")
modelPackage.set("my.package.model")
invokerPackage.set("my.package.api.services")
validateSpec.set(true)
generateApiTests.set(false)
configOptions.set([
apiPackage : "my.package.services",
modelPackage : "my.package.model",
invokerPackage : "my.package.services",
dateLibrary : "java8",
gradleProject : "true",
groupId : "my.package",
artifactId : "example",
library : "se",
helidonVersion : "$helidonVersion",
serializationLibrary: "jackson",
fullProject : "false",
useAbstractClass : "true",
"x-helidon-groupBy" : "first-path-segment"
])
}
Steps to reproduce
Use the java-helidon-server plugin to generate the server implementation
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the java-helidon-server generator and the linked bugs.json OpenAPI declaration, then trace how exclusiveMinimum becomes the generated validator.validateMin call. Reproduce generation with the Gradle plugin and verify that the boolean argument reflects the schema's exclusiveMinimum setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100