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

Missing description for generated health OpenAPI responses #15551

Closed
knutwannheden opened this issue Mar 8, 2021 · 3 comments · Fixed by #15554
Closed

Missing description for generated health OpenAPI responses #15551

knutwannheden opened this issue Mar 8, 2021 · 3 comments · Fixed by #15554

Comments

@knutwannheden
Copy link
Contributor

knutwannheden commented Mar 8, 2021

Describe the bug
According to the validator https://apitools.dev/swagger-parser/online/ (and also that in the Azure API Management) the OpenAPI definition generated by the Quarkus Health extension are invalid. The API responses don't have any description.

Expected behavior
The individual API responses should each have their description. Like in this extract:

    get:
      tags:
      - MicroProfile Health
      summary: An aggregated view of the Liveness and Readiness of this application
      description: Check the health of the application
      operationId: microprofile_health_root
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'

Actual behavior
Here is an extract of what gets generated:

    get:
      tags:
      - MicroProfile Health
      summary: An aggregated view of the Liveness and Readiness of this application
      description: Check the health of the application
      operationId: microprofile_health_root
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'

To Reproduce
Create a project including the OpenAPI and Health extensions.

Configuration

quarkus.health.openapi.included=true

Environment (please complete the following information):

  • Output of uname -a or ver:
  • Output of java -version:
  • GraalVM version (if different from Java):
  • Quarkus version or git rev:
  • Build tool (ie. output of mvnw --version or gradlew --version):

Additional context
To be honest I have not yet checked the specs myself, but since two tools reported errors I was assuming that they are correct.

@knutwannheden knutwannheden added the kind/bug Something isn't working label Mar 8, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 8, 2021

@phillip-kruger
Copy link
Member

Thanks. I'll fix this a.s.a.p

@knutwannheden
Copy link
Contributor Author

The samples in Expected behavior and Actual behavior were reversed. I have fixed that now in the issue description.

@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Mar 9, 2021
@gsmet gsmet modified the milestones: 1.13 - master, 1.12.2.Final Mar 10, 2021
This was referenced Mar 12, 2021
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants