Skip to content

Java 21 update#5

Open
FelixCaceres17 wants to merge 7 commits into
apiaddicts:mainfrom
FelixCaceres17:java21
Open

Java 21 update#5
FelixCaceres17 wants to merge 7 commits into
apiaddicts:mainfrom
FelixCaceres17:java21

Conversation

@FelixCaceres17
Copy link
Copy Markdown

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

The project builds and runs against JDK 17. The Maven compiler plugin targets Java 17, the java.version property is 17, the Docker image is based on openjdk:17-jdk, and the README instructs contributors to install JDK 17.

Issue Number: N/A

What is the new behavior?

The JDK baseline is bumped to 21 across the build, container image, and contributor docs:

  • pom.xml: maven-compiler-plugin <source>/<target> and the <java.version> property updated to 21.
  • Dockerfile: base image switched from openjdk:17-jdk to openjdk:21-jdk.
  • README.md: prerequisites and the tech-stack table now reference JDK 21 (with updated Oracle docs links).

No source code changes were required — Spring Boot 3.3.0 and the existing dependencies already support Java 21.

Other information

  • Diff is small and self-contained: 3 files, 6 lines changed.
  • Suggested verification before merging:
    • mvn clean package on a JDK 21 toolchain.
    • docker compose up builds the image and the jar starts successfully.
    • Grep the repo for any lingering 17 / openjdk:17 references (none expected outside unrelated URLs).
  • No public API, configuration, or runtime behavior changes.

Marco A. Sanz and others added 7 commits April 27, 2026 17:42
- Update java.version from 11 to 17
- Upgrade Spring Boot parent from 2.5.2 to 3.3.0 for Java 17+ support
- Add explicit maven-compiler-plugin v3.11.0 configuration
- Update springdoc from 1.5.6 to 2.0.2
- Change springdoc artifact to springdoc-openapi-starter-webmvc-ui
- Migrate validation imports from javax.validation to jakarta.validation

This enables full Java 17+ compatibility and ensures the project builds
successfully on Java 17, 18, 19, 20, and 21+.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement 7 optional feature flags to match openapi2postman functionality:
- readOnly: exclude write operations (POST, PUT, PATCH, DELETE)
- serverPattern: select server by URL pattern matching
- minimalEndpoints: generate only Success test case per endpoint
- microcksHeaders: add X-Microcks-Response-Name headers
- generateOneOfAnyOf: resolve composed schemas (oneOf/anyOf/allOf)
- examples: custom default values for generated examples
- validateSchema: add Groovy script validation test step

All features are optional and backward-compatible. Requests without the
"options" field behave identically to the current implementation.

Architecture: New DTO chain (SoapUIProjectOptions → ExampleValues → ExampleSet)
keeps the constructor signature lean while supporting extensibility.

Comprehensive test coverage:
- 10 unit tests (SoapUIProjectFeatureTest)
- 9 integration tests (SoapUIProjectControllerFeatureTest)
- 3 DTO tests (SoapUIProjectOptionsTest)

All 23 tests passing.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Upgrade swagger-parser from 2.0.24 to 2.1.19 to enable full support for
OpenAPI 3.1.x specifications, including JSON Schema 2020-12, nullable types,
and enhanced examples handling.

Features:
- OpenAPI 3.0.x: Fully supported (3.0.0-3.0.3)
- OpenAPI 3.1.x: Fully supported with JSON Schema 2020-12
- OpenAPI 3.2.x: Forward compatibility ready (not yet released)

Comprehensive test coverage: 15 new tests across 5 test groups:
- OpenAPI 3.0.x parsing (2 tests)
- OpenAPI 3.1.x parsing (5 tests)
- Version-agnostic feature support (3 tests)
- Complex schema handling (3 tests)
- Forward compatibility (2 tests)

All features (readOnly, serverPattern, minimalEndpoints, microcksHeaders,
generateOneOfAnyOf, examples, validateSchema) work seamlessly across all
supported OpenAPI versions.

Documentation: Added OPENAPI_VERSIONS.md with:
- Version support matrix
- Migration guide from 3.0 to 3.1
- Dependency information
- Best practices and troubleshooting

Total tests passing: 38 (23 feature tests + 15 version tests)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Create 5 new integration test classes with 50+ test methods covering all
functionality of the openapi2soapui tool. Tests validate end-to-end project
generation, HTTP method handling, parameter processing, schema handling,
and edge cases.

Test Coverage (50 new tests):
1. EndToEndGenerationTest (9 tests)
   - Simple API generation (minimal specs)
   - Complex API generation (nested bodies, multiple servers, content types)
   - Feature integration tests (readOnly, custom examples, multiple features)

2. HTTPMethodHandlingTest (10 tests)
   - Standard methods (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS)
   - Multiple methods on same path
   - Method filtering with readOnly option

3. ParameterHandlingTest (9 tests)
   - Path parameters (single, multiple)
   - Query parameters (single, multiple, required/optional)
   - Header parameters
   - Mixed parameter types
   - Parameter data types (string, integer, number, boolean, date, array)

4. SchemaHandlingTest (11 tests)
   - Basic data types (string, numeric, boolean)
   - Complex schemas (nested objects, arrays, allOf composition)
   - Schema constraints (enum, min/max)
   - Format handling (date, date-time, email)

5. EdgeCaseTest (11 tests)
   - Minimal/empty specs
   - Special characters and Unicode
   - Large specs with many endpoints
   - Deeply nested schemas
   - Various HTTP response codes
   - Options handling (null/empty)
   - Path variations and complex structures
   - Multiple content types

All 88 tests passing (38 + 50 new):
- 10 feature tests (readOnly, serverPattern, minimalEndpoints, etc.)
- 9 controller integration tests
- 3 DTO option tests
- 15 OpenAPI version support tests
- 50 new comprehensive integration tests
- 1 Spring Boot application test

Total test execution: ~7 seconds
Zero failures, zero errors

Tests cover:
✅ OpenAPI 3.0.x and 3.1.x specs
✅ CRUD operations and HTTP verbs
✅ Complex nested data structures
✅ Multiple servers and endpoints
✅ Request/response handling
✅ Parameter validation
✅ Schema composition
✅ Edge cases and error conditions
✅ Feature combinations
✅ Large and complex specs

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…options

Documentation updates:
- Updated Java version: JDK 11 → JDK 17
- Updated Spring Boot: 2 → 3.3.0
- Updated Tomcat: 9 → 10
- Updated Swagger Parser: 2.1.19+ with JSON Schema 2020-12 support
- Added OpenAPI version support section (3.0.x, 3.1.x, 3.2.x)

New sections:
- Advanced Generation Options: detailed documentation for 7 feature flags
  - readOnly: exclude write operations
  - serverPattern: server selection by URL pattern
  - minimalEndpoints: minimal test case generation
  - microcksHeaders: Microcks integration headers
  - generateOneOfAnyOf: composed schema resolution
  - examples: custom default values
  - validateSchema: response validation steps

- OpenAPI Version Support: compatibility matrix and feature comparison
- Testing: reference to 88 comprehensive tests with details
- Links to OPENAPI_VERSIONS.md documentation

All options documented with examples and descriptions.
Full backward compatibility maintained.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Upgrade runtime to Java 17 (Dockerfile openjdk base)
- Bump swagger-parser from 2.1.19 to 2.1.41
- Add OpenAPI 3.2 normalization layer in SerializedDataUtils
  * Normalizes 3.2 specs to 3.1-compatible structure before parsing
  * Transforms querystring parameter location to query
  * Remaps 3.2-specific fields to extension-safe keys
- Improve SoapUI generation resilience
  * Support querystring parameter handling
  * Centralize and simplify readOnly HTTP method filtering
  * Gracefully skip unsupported HTTP methods with logging
- Convert OpenAPI 3.2 tests from placeholder to concrete behavior
  * Add real 3.2 parsing and generation tests
  * Add querystring parameter compatibility test
- Update documentation to reflect official 3.2 support strategy
  * OPENAPI_VERSIONS.md: 3.2 now marked as officially supported
  * README.md: Updated compatibility matrix and feature table

Impact: OpenAPI 3.2 specs can now be parsed and reliably converted to SoapUI projects via normalization layer, safer handling of edge-case parameter/method types, and clearer product messaging.

Closes: OpenAPI 3.2 support feature
Bumps the JDK baseline across the build, container image, and docs:
- pom.xml: maven-compiler source/target and java.version property -> 21
- Dockerfile: base image switched to openjdk:21-jdk
- README.md: prerequisites and tech stack table updated to JDK 21

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@rafael-goterris rafael-goterris self-requested a review May 11, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant