Bug Report Checklist
Description
Using the generator option:
disallowAdditionalPropertiesIfNotPresent=false
... with the jaxrs-spec generator leads to invalid POJOs being generated.
Seems to be a regression introduced by #22366 (found during openapi-generator-maven-plugin from 7.17 to 7.21).
This part of the change assumes that this.put / this.get methods are present - which is NOT the case when the mentioned generator option is set while "additionalProperties" is not defined on the model - hence the POJO doesn't extend Map<> --> compiler error.
openapi-generator version
7.20, 7.21
OpenAPI declaration file content or url
reproducer repo: https://github.com/Philipp-Borchert-ISH/jaxrs-spec-repro
plain old petstore.yaml https://github.com/Philipp-Borchert-ISH/jaxrs-spec-repro/blob/main/src/main/resources/petstore.yaml
Generation Details
see https://github.com/Philipp-Borchert-ISH/jaxrs-spec-repro/blob/8e8761881dbd8ed264e5839466e6be424c73c6fd/pom.xml#L102-L121
Steps to reproduce
- run
mvn compile or ./mvnw compile
- observe compilation errors due to missing "extends Map<>" on several POJOs
Suggest a fix
Bug Report Checklist
Description
Using the generator option:
disallowAdditionalPropertiesIfNotPresent=false
... with the jaxrs-spec generator leads to invalid POJOs being generated.
Seems to be a regression introduced by #22366 (found during openapi-generator-maven-plugin from 7.17 to 7.21).
This part of the change assumes that this.put / this.get methods are present - which is NOT the case when the mentioned generator option is set while "additionalProperties" is not defined on the model - hence the POJO doesn't extend Map<> --> compiler error.
openapi-generator version
7.20, 7.21
OpenAPI declaration file content or url
reproducer repo: https://github.com/Philipp-Borchert-ISH/jaxrs-spec-repro
plain old petstore.yaml https://github.com/Philipp-Borchert-ISH/jaxrs-spec-repro/blob/main/src/main/resources/petstore.yaml
Generation Details
see https://github.com/Philipp-Borchert-ISH/jaxrs-spec-repro/blob/8e8761881dbd8ed264e5839466e6be424c73c6fd/pom.xml#L102-L121
Steps to reproduce
mvn compileor./mvnw compileSuggest a fix