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

Custom openapi.yml under META-INF not merged after upgrade to 3.17.x #44886

Closed
luca-bassoricci opened this issue Dec 3, 2024 · 5 comments · Fixed by #44892
Closed

Custom openapi.yml under META-INF not merged after upgrade to 3.17.x #44886

luca-bassoricci opened this issue Dec 3, 2024 · 5 comments · Fixed by #44892
Labels
area/openapi area/smallrye env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@luca-bassoricci
Copy link
Contributor

Describe the bug

After upgrading to Quarkus 3.17 partial Openapi files (openapi.yml) under META-INF is not merged into final openapi.yml schema.
In version 3.16.4 file is merged es expected.
Partial openapi.yml

components:
  schemas:
    ListOfValues:
      type: string
      enum:
        - Area_condivisa
        - AC
        - ADCAM
        - CNM
        - IVATR
        - IRAP
        - MODIVA
        - UNIPF
        - UNISC
        - UNISB
        - UNISP
        - STSET

openapi - not merged.txt
openapi - merged.txt

Expected behavior


openapi: 3.0.3
info:
title: openapi-issue API
version: 1.0.0-SNAPSHOT
paths:
/openapi-issue:
post:
tags:
- Resource
description: Do Action
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DoActionRequest"
responses:
"201":
description: Created
components:
schemas:
ListOfValues:
enum:
- Area_condivisa
- AC
- ADCAM
- CNM
- IVATR
- IRAP
- MODIVA
- UNIPF
- UNISC
- UNISB
- UNISP
- STSET
type: string
DoActionRequest:
type: object
properties:
value:
$ref: "#/components/schemas/ListOfValues"

Actual behavior


components:
schemas:
DoActionRequest:
type: object
properties:
value:
$ref: "#/components/schemas/ListOfValues"
openapi: 3.1.0
paths:
/openapi-issue:
post:
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DoActionRequest"
required: true
responses:
"201":
description: Created
summary: Do Action
tags:
- Resource
info:
title: openapi-issue API
version: 1.0.0-SNAPSHOT

How to Reproduce?

Start with quarkus:dev and open swagger-ui console

Output of uname -a or ver

Microsoft Windows [Versione 10.0.22631.4460]

Output of java -version

java version "17.0.4.1" 2022-08-18 LTS

Quarkus version or git rev

3.17.2

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

Reproducer here: https://github.com/luca-bassoricci/openapi-issue/
main branch for 3.17.2 behaviour, switch to branch 3.16.x for old one.

@luca-bassoricci luca-bassoricci added the kind/bug Something isn't working label Dec 3, 2024
Copy link

quarkus-bot bot commented Dec 3, 2024

/cc @EricWittmann (openapi), @MikeEdgar (openapi), @phillip-kruger (openapi)

@MikeEdgar
Copy link
Contributor

I'm looking into this.

@phillip-kruger
Copy link
Member

@MikeEdgar maybe the versions ? The one in 3.0.3 and the other 4 ?

@MikeEdgar
Copy link
Contributor

It's fixed in smallrye-open-api 4.0.4 - I'm releasing it now 😃 . The related PR was smallrye/smallrye-open-api#2079, this is happening because the classes of the schema maps were not the same so the static file was dropped.

@gsmet
Copy link
Member

gsmet commented Dec 3, 2024

This will be included in 3.17.3 released tomorrow (if all goes well :)).

Thanks a lot for the detailed report and the reproducer. It makes a huge difference!

@gsmet gsmet modified the milestones: 3.18 - main, 3.17.3 Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/openapi area/smallrye env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants