Forums: 
Brian Dilley
August 19 2018 at 4:06 PM

My application is built with Spring Boot and the swagger configuration is automatically generated.  However, when I attempt to submit my api for review i'm blocked by the YAML specification field, i've tried editing my yaml many times to no avail.  Currently here all of the erorrs that i'm getting:

The specified file quickride-swagger.yaml could not be uploaded. Description missing for Operation /paths/api/v1/rides/get. Missing mandatory header parameter: Accept on path /paths/api/v1/rides/get. Missing mandatory header parameter: Accept-Charset on path /paths/api/v1/rides/get. Missing mandatory header parameter: Accept-Language on path /paths/api/v1/rides/get. Missing mandatory header parameter: If-Match on path /paths/api/v1/rides/get. Missing mandatory header parameter: If-None-Match on path /paths/api/v1/rides/get. Missing mandatory header parameter: Prefer on path /paths/api/v1/rides/get. Missing mandatory header parameter: Request-Id on path /paths/api/v1/rides/get. Description missing for Operation /paths/api/v1/rides/post. Missing mandatory header parameter: Accept on path /paths/api/v1/rides/post. Missing mandatory header parameter: Accept-Charset on path /paths/api/v1/rides/post. Missing mandatory header parameter: Accept-Language on path /paths/api/v1/rides/post. Missing mandatory header parameter: If-Match on path /paths/api/v1/rides/post. Missing mandatory header parameter: If-None-Match on path /paths/api/v1/rides/post. Missing mandatory header parameter: Prefer on path /paths/api/v1/rides/post. Missing mandatory header parameter: Request-Id on path /paths/api/v1/rides/post. Description missing for Operation /paths/api/v1/rides/{rideId}/get. Missing mandatory header parameter: Accept on path /paths/api/v1/rides/{rideId}/get. Missing mandatory header parameter: Accept-Charset on path /paths/api/v1/rides/{rideId}/get. Missing mandatory header parameter: Accept-Language on path /paths/api/v1/rides/{rideId}/get. Missing mandatory header parameter: If-Match on path /paths/api/v1/rides/{rideId}/get. Missing mandatory header parameter: If-None-Match on path /paths/api/v1/rides/{rideId}/get. Missing mandatory header parameter: Prefer on path /paths/api/v1/rides/{rideId}/get. Missing mandatory header parameter: Request-Id on path /paths/api/v1/rides/{rideId}/get. Description missing for Operation /paths/api/v1/rides/{rideId}/put. Missing mandatory header parameter: Accept on path /paths/api/v1/rides/{rideId}/put. Missing mandatory header parameter: Accept-Charset on path /paths/api/v1/rides/{rideId}/put. Missing mandatory header parameter: Accept-Language on path /paths/api/v1/rides/{rideId}/put. Missing mandatory header parameter: If-Match on path /paths/api/v1/rides/{rideId}/put. Missing mandatory header parameter: If-None-Match on path /paths/api/v1/rides/{rideId}/put. Missing mandatory header parameter: Prefer on path /paths/api/v1/rides/{rideId}/put. Missing mandatory header parameter: Request-Id on path /paths/api/v1/rides/{rideId}/put. Description missing for Operation /paths/api/v1/rides/{rideId}/delete. Missing mandatory header parameter: Accept on path /paths/api/v1/rides/{rideId}/delete. Missing mandatory header parameter: Accept-Charset on path /paths/api/v1/rides/{rideId}/delete. Missing mandatory header parameter: Accept-Language on path /paths/api/v1/rides/{rideId}/delete. Missing mandatory header parameter: If-Match on path /paths/api/v1/rides/{rideId}/delete. Missing mandatory header parameter: If-None-Match on path /paths/api/v1/rides/{rideId}/delete. Missing mandatory header parameter: Prefer on path /paths/api/v1/rides/{rideId}/delete. Missing mandatory header parameter: Request-Id on path /paths/api/v1/rides/{rideId}/delete. Description missing for Operation /paths/api/v1/rides/{rideId}/patch. Missing mandatory header parameter: Accept on path /paths/api/v1/rides/{rideId}/patch. Missing mandatory header parameter: Accept-Charset on path /paths/api/v1/rides/{rideId}/patch. Missing mandatory header parameter: Accept-Language on path /paths/api/v1/rides/{rideId}/patch. Missing mandatory header parameter: If-Match on path /paths/api/v1/rides/{rideId}/patch. Missing mandatory header parameter: If-None-Match on path /paths/api/v1/rides/{rideId}/patch. Missing mandatory header parameter: Prefer on path /paths/api/v1/rides/{rideId}/patch. Missing mandatory header parameter: Request-Id on path /paths/api/v1/rides/{rideId}/patch.

The error message itself is super hard to read given how it all just runs together like that.

That said, the requirements to include the headers Accept, Appect-Charset, Accept-Language, If-Match, If-None-Match, Prefer, and Request-Id when we're not even using them is a bit overkill.  I'm not even sure what to put for some of them.

Looking for some advice on how to proceed here.  The link to my swagger API is available here: https://integration-api-qa.goquickride.com/swagger-ui.html#/shuttle-ride-controller

 

EDIT: I banged my head against the monitor for a few more hours trying to get past the validator.  Still haven't figured it out.  Here's my yaml thus far: https://gist.github.com/briandilley/5af65e9c0726004a4f234a1a2ea9f3e0

Jack Petraitis
October 3, 2018 at 12:15 PM

We are working on the API spec linting. We agree the rules have been a bit strict. We have since relaxed some of the rules regarding API headers during the linting phase. You should be seeing less error messages now. We have also worked on formatting and are always actively working to make the workflow better. Thank you for the feedback, and please raise a community post again for any future issues.