Skip to content

Instantly share code, notes, and snippets.

@jpriebe
Created May 19, 2021 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpriebe/3bfc34a63b586616bc22190b84a5440e to your computer and use it in GitHub Desktop.
Save jpriebe/3bfc34a63b586616bc22190b84a5440e to your computer and use it in GitHub Desktop.
Example of API that has a response that isn't handled properly by openapi-generator's golang client code
swagger: '2.0'
info:
version: '1'
title: Test
description: Test Service
contact: {}
host: localhost:8080
basePath: /api/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: Test
description: Test
paths:
"/test":
get:
tags:
- Test
summary: Test endpoint to return JSON-encoded string
description: 'Responses are: Value1, Value2, Value3, Value4'
operationId: TestJSONString
responses:
'200':
description: OK
schema:
type: string
'500':
description: Internal Server Error
schema:
type: string
deprecated: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment