Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct handling of new properties added for OpenAPI 3.1 #30513

Open
wants to merge 3 commits into
base: integration
Choose a base branch
from

Conversation

Azquelt
Copy link
Member

@Azquelt Azquelt commented Jan 9, 2025

Properties added in OpenAPI 3.1 are no longer processed when reading and writing OpenAPI 3.0 documents

Previously, the property would sometimes be output anyway, creating an invalid OpenAPI 3.0 document.

A warning is emitted if an OpenAPI annotation property from OpenAPI 3.1 is used but the user has requested OpenAPI 3.0 output in their configuration

We want a warning to tell the user that their annotation will be ignored because of the OpenAPI version they've configured.

Fixes #30036
Fixes #30514

@Azquelt Azquelt force-pushed the openapi-unsupported-annotations branch 2 times, most recently from fa6e772 to f005aa3 Compare January 9, 2025 15:41
Warn if the user has used annotation parameters which correspond to
features added in OpenAPI 3.1 but they have configured use of OpenAPI
3.0.
@Azquelt Azquelt force-pushed the openapi-unsupported-annotations branch from f005aa3 to bb99aca Compare January 9, 2025 15:48
@Azquelt
Copy link
Member Author

Azquelt commented Jan 9, 2025

#build (view Open Liberty Personal Build - ❌ completed with errors/failures.)

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

LibbyBot commented Jan 9, 2025

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 9 FAT files were changed, added, or removed.

  • Check that the build did not break the affected FAT suite(s).

  • 1 infrastructure code files were changed.

  • 14 product code files were changed.

  • Please describe in a separate comment how you tested your changes.

@Azquelt Azquelt force-pushed the openapi-unsupported-annotations branch from bb99aca to e563498 Compare January 10, 2025 11:04
- SmallRye OpenAPI 4.0.6
- Jandex 3.2.3 (prereq of OpenAPI)

This includes a fix to not output properties introduced in OpenAPI 3.1
when generating an OpenAPI 3.0 document.
@Azquelt Azquelt force-pushed the openapi-unsupported-annotations branch from e563498 to 4bb5691 Compare January 10, 2025 11:05
@Azquelt
Copy link
Member Author

Azquelt commented Jan 10, 2025

#build
(view Open Liberty Personal Build - ❌ completed with errors/failures.)
#spawn.fullfat.buckets=com.ibm.ws.microprofile.openapi.1.1_fat_tck,com.ibm.ws.microprofile.openapi_fat,com.ibm.ws.microprofile.openapi_fat_tck,com.ibm.ws.openapi.ui_fat,io.openliberty.microprofile.openapi.2.0.internal_fat,io.openliberty.microprofile.openapi.2.0.internal_fat_tck,io.openliberty.microprofile.openapi.3.0.internal_fat_tck,io.openliberty.microprofile.openapi.3.1.internal_fat_tck,io.openliberty.microprofile.openapi.4.0.internal_fat,io.openliberty.microprofile.openapi.4.0.internal_fat_tck,io.openliberty.microprofile.openapi.ui.internal_fat

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 9 FAT files were changed, added, or removed.

  • Check that the build did not break the affected FAT suite(s).

  • 1 infrastructure code files were changed.

  • 15 product code files were changed.

  • Please describe in a separate comment how you tested your changes.

@@ -0,0 +1,144 @@
/*******************************************************************************
* Copyright (c) 2024, 2025 IBM Corporation and others.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is a new file should it have 2024?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would, but it's not new, it was extracted from OpenAPIVersionConfigImpl.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used to be internal to that class, but I needed to use it in the new OpenAPIVersionUsageChecker so I moved it into its own class.

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_Mo04IM9KEe-f-sI4gb7_Pw

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_zZ-2YM_TEe-f-sI4gb7_Pw

Target locations of links might be accessible only to IBM employees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants