I’ve tried to load the Swagger JSON but keep getting a failure:
Failed to resolve Swagger from : Failed to expand document: Failed to expand path /form/{parent-uuid}/resource: Failed to expand POST operation: Failed to expand 201 response: Failed to resolve response schema reference #/definitions/FormResourceGet: object has no key “FormResourceGet”
The steps are tricky because it’s using code from go-openapi. The easiest way to see what’s wrong is to download the JSON file and load it the Swagger editor at http://editor.swagger.io/. The catch is that if you try and save the JSON Swagger from https://demo.openmrs.org/openmrs/module/webservices/rest/swagger.json you need to be sure your browser doesn’t add any cruft. You can hand remove it if it does (this is because the mime type is reported as HTML on that link I believe). When it’s loaded in the editor (either via copy/paste or loading a file) you will see a number of validation errors in the editor. Sorry if it seems obtuse but if you need more help, let me know.
I’m trying to generate code in the Go programming language for the Swagger. The tool we’ve written will parse the swagger and generate the code. The fact that the Swagger is invalid means that code that uses the swagger will fail (like my case). I’m not working on a ticket…I’m more likely to be a person opening a ticket actually.
I saw that one and wasn’t sure it applied. This is a completely missing type from the Swagger where as it seems the bug is more about the low level types (integer, boolean, etc). Should I add a note to it perhaps?