[ 
https://issues.apache.org/jira/browse/CAMEL-24119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Federico Mariani updated CAMEL-24119:
-------------------------------------
    Attachment: camel-rest-openapi-openapi-java-improvements.md

> camel-rest-openapi & camel-openapi-java: structural improvements from the 
> July 2026 code review - umbrella
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24119
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24119
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-openapi-java, camel-rest-openapi
>            Reporter: Federico Mariani
>            Priority: Minor
>              Labels: code-review
>         Attachments: camel-rest-openapi-openapi-java-improvements.md
>
>
> Umbrella for structural improvements to {{camel-rest-openapi}} and 
> {{camel-openapi-java}} identified during the July 2026 deep code review (bug 
> tickets: CAMEL-24112..24117, CAMEL-24118). Unlike the bug tickets, these 
> target the *categories* behind the defects rather than single instances. Full 
> write-up with rationale and code references is in the attached 
> {{camel-rest-openapi-openapi-java-improvements.md}}.
> Summary of proposed improvements:
> h3. camel-rest-openapi
> # Build delegate {{rest:}} endpoints as prototypes (removes the 
> shared-mutable-endpoint category behind CAMEL-24113)
> # Delegate request validation to swagger-request-validator and run it after 
> binding/marshalling (fixes the CAMEL-24114 blind spots wholesale; aligns with 
> CAMEL-23599)
> # Per-consumer strategy state + consumer-owned processor lifecycle 
> (categories behind CAMEL-24116/24117)
> # Single "effective operation id" abstraction used by validation, dispatch, 
> mocking and the REST registry (category behind CAMEL-24115)
> # Deterministic, documented server selection (host+basePath from the same, 
> first server; optional serverIndex/serverName option)
> # Fail fast with descriptive spec diagnostics instead of NPEs on malformed 
> specs
> # Real Accept/Content-Type negotiation for mock responses; route mocks 
> through RestBindingAdvice (CORS, OPTIONS preflight)
> h3. camel-openapi-java
> # One shared DSL-type -> typed-swagger-schema mapping utility (removes the 
> CAMEL-24118 invalid-output category)
> # CI validation of generated documents against the official OpenAPI 3.0/3.1 
> meta-schemas
> # Stop mutating JVM-global swagger-core state (ModelConverters singletons, 
> Json/Yaml mapper date-format mutation)
> # Deterministic output ordering (ordered collections instead of HashSet where 
> content reaches the document)
> # Consistent X-Forwarded-* handling
> # Align reader evolution with open feature requests (CAMEL-21742/21743/21744, 
> CAMEL-18950, CAMEL-19763, CAMEL-23570)
> h3. Cross-component
> # Shared server-URL parsing helper (variables substitution, defined 
> fallbacks, descriptive errors) used by both components — also the right home 
> for the CAMEL-22257 URI.create regression fix
> # Regression tests for the untested combinations the review exposed 
> (multi-param operations + literals, two consumers/producers per spec, route 
> reload, specs without operationId/servers/200-responses)
> ----
> _This issue was researched and filed by Claude Code on behalf of [~croway] 
> (GitHub: Croway), as part of a deep code review of camel-rest-openapi and 
> camel-openapi-java on main (4.22.0-SNAPSHOT)._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to