Closed rbg closed 5 years ago
The swagger example used was:
swagger: "2.0" info: title: "API" version: "1.0.0" contact: name: Contact Name email: contact@example.com url: https://example.com/ tags: - name: Metadata description: Metadata related requests paths: /test: get: summary: Simple test for o2p produces: - application/json responses: '200': description: Test info schema: $ref: "#/definitions/Infohash" definitions: Infohash: type: object additionalProperties: type: string
while the prev swagger does generate the expected go code (i'm using go-swagger) openapi2proto errors out as described: However if i use the following both go-swagger and openapi2proto produce the expected output:
swagger: "2.0" info: title: "API" version: "1.0.0" contact: name: Contact Name email: contact@example.com url: https://example.com/ tags: - name: Metadata description: Metadata related requests paths: /test: get: summary: Simple test for o2p produces: - application/json responses: '200': description: Test info schema: $ref: "#/definitions/Infohash" definitions: Infohash: type: object properties: info: type: object additionalProperties: type: string
Using a simple example it looks like there is bug in processing additional parameters as Maps.
the error returned is: