calleandersson opened a new issue, #8165:
URL: https://github.com/apache/camel-quarkus/issues/8165

   ### Describe the feature here
   
   Camel Quarkus should add support for type mappings when generating code from 
OpenAPI specifications.
   
   As a suggestion, type mappings should be specified by the following 
configuration property:
   ```properties
   quarkus.camel.openapi.codegen.type-mappings.[TYPE_A]=[REPLACEMENT_TYPE_X]
   quarkus.camel.openapi.codegen.type-mappings.[TYPE_B]=[REPLACEMENT_TYPE_Z]
   ```
   
   `CamelQuarkusSwaggerCodegenProvider` should handle the configuration 
property and apply type mappings to the Swagger Codegen configuration.
   
   As an example, given the following property defined within an OpenAPI 
specification:
   ```yaml
   amount:
      description: amount of money
      type: number
      format: double
      multipleOf: 0.01
      example: 42.50
   ```
   As default, the generated code looks like this:
   ```java
   @JsonProperty("amount")
   private Double amount = null;
   ```
   By adding the following configuration property:
   ```properties
   quarkus.camel.openapi.codegen.type-mappings.Double=java.math.BigDecimal
   ```
   The generated code should look like this:
   ```java
   @JsonProperty("amount")
   private java.math.BigDecimal amount = null;
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to