CRREL / GRiD-API

9 stars 3 forks source link

Pasting "this link" into Swagger UI demo generates error #55

Closed h3rb-ts closed 3 years ago

h3rb-ts commented 3 years ago

Pasting "this link" into Swagger UI demo: https://raw.githubusercontent.com/CRREL/GRiD-API/master/swagger.v3.yaml

Results in:

Errors

Parser error on line 31 can not read a block mapping entry; a multiline key may not be an implicit key

chambbj commented 3 years ago

@h3rb-ts You are trying to import this into editor.swagger.io or similar?

I believe that it simply doesn't like that this version has a few template parameters interspersed to make it easier to deploy to multiple instances. You could replace each occurrence of {{ URL_ROOT }} with the URL of an actual GRiD instance, and that error would go away.

Honestly, you'll probably run across a few other validation issues as well, as this has strayed a bit over the years. I'm working on cleaning these up and upgrading to OpenAPI 3.0 as well, so I'm not sure we'll be pushing any further updates to this 2.0 spec.

Note that on GRiD, you could go to the API page and work with an interactive Swagger session. Maybe this meets your needs?

h3rb-ts commented 3 years ago

Reporting for your benefit. I suggest you update your README

Best, -h

chambbj commented 3 years ago

Closed via https://github.com/CRREL/GRiD-API/commit/1c252f7576ec72d852b60afaf510996c0e1a5c97