Just in case anybody has similar problem.
I can now get my Quarkus service to generate an openApi contract that I can import into Stoplight with no errors.
In the actual java class I have a bunch of tags as follows:
@GET
@Path("/studentprofile")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get student profile for parking application", description="Get student profile for parking application")
@APIResponse(responseCode = "200", description = "The student profile for parking application",
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = GetStudParkingProfile_Response.class)))
@APIResponse(responseCode = "400", description = "Invalid parameters",
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = ErrorResponse.class)))
@APIResponse(responseCode = "500", description = "Internal Server error",
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = ErrorResponse.class)))
public Response getStudentParkingProfile(@Parameter(description = "SU Number of student", required = true)@QueryParam("suNumber") String suNumber,
@Parameter(description = "year of study that profile is required for", required = true)@QueryParam("year") int year) {
And I then have a openapi.yml file in under my resources folder in a META-INF subdirectory as follows:
openapi: 3.0.3
servers:
- url: https://serviceproxy.sun.ac.za/sunstudent-api
description: The production environment base
- url: https://serviceproxy-test.sun.ac.za/sunstudent-api
description: The test environment base url
- url: https://serviceproxy-dev.sun.ac.za/sunstudent-api
description: The development environment base url
tags: ##Tags must be in alphabetical order....
- name: MicroProfile Health
description: Check the health of the application
- name: Parking Service
description: Retrieve info on students for use with parking application
security:
- BasicAuth: []
Then just to complete the setup I have a bunch of settings in my application.properties file as follows:
##openapi headers
mp.openapi.extensions.smallrye.info.title=Student information for parking application
mp.openapi.extensions.smallrye.info.version=1.0.0
mp.openapi.extensions.smallrye.info.description=API for retrieving student specific information for parking application
mp.openapi.extensions.smallrye.info.contact.email=elmarm@sun.ac.za
mp.openapi.extensions.smallrye.info.contact.name=Elmar Matthee
mp.openapi.extensions.smallrye.info.contact.url=http://www.sun.ac.za
quarkus.smallrye-openapi.info-license-name=SU Contract
quarkus.smallrye-openapi.info-license-url=http://www.sun.ac.za
quarkus.smallrye-openapi.security-scheme-name=BasicAuth
quarkus.smallrye-openapi.security-scheme-description=Basic http auth
quarkus.smallrye-openapi.security-scheme=basic
mp.openapi.extensions.smallrye.operationIdStrategy=METHOD
its quite mashup of various settings, but it seems to work.