davsclaus opened a new pull request, #30031:
URL: https://github.com/apache/camel/pull/30031

   JIRA: [CAMEL-26933](https://issues.apache.org/jira/browse/CAMEL-26933), item 
4.
   
   ## What changes
   
   - **DTOs that compile.** With the default runtime (quarkus) the DTOs 
imported `javax.validation` and `JsonNullable`, because `useJakartaEe=false` 
was hard-coded; with spring-boot they imported `io.swagger.v3.oas.annotations`. 
Neither compiled in a Camel 4 project. The generator now runs with 
`useJakartaEe=true`, `openApiNullable=false`, and 
`documentationProvider`/`annotationLibrary=none`. `--runtime=main` now uses the 
generator that quarkus uses, as its DTOs imported Spring's `@DateTimeFormat`.
     - Checked with `javac` on the petstore DTOs: quarkus and main compile with 
only `jackson-annotations`, `jakarta.validation-api` and 
`jakarta.annotation-api`; spring-boot also needs `spring-context`, which a 
Spring Boot project has.
   - **Only the REST DSL on stdout.** The "Thanks for using OpenAPI Generator" 
banner was printed on stdout after the REST DSL, so `camel generate rest 
--input=... --type=xml > rest.xml` was not valid XML. The generator now runs 
quiet (`quiet` global property).
   - **A URL as input.** `--input=https://...` was refused as a file that does 
not exist, although the OpenAPI parser reads URLs.
   
   ## Tests
   
   `CodeRestGeneratorTest`:
   - `theDtosUseJakartaAndNoLibraryTheProjectDoesNotHave` (quarkus, main, 
spring-boot);
   - `theRestDslIsTheOnlyOutput`.
   
   Both fail on main. The plugin's tests are green. Upgrade guide entry added, 
since regenerated DTOs change.
   
   ## Left of item 4
   
   - `--openapi-version` is still not read: the parser detects the version from 
the specification, so the option has no effect.
   - The DTOs still go to the working directory, whatever `--output` says.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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