Skip to content

Instantly share code, notes, and snippets.

@thomas-bc
Created April 13, 2020 20:56
Show Gist options
  • Save thomas-bc/549582b87073b8e02971fb623e30cabc to your computer and use it in GitHub Desktop.
Save thomas-bc/549582b87073b8e02971fb623e30cabc to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
description: 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.'
version: 1.0.5
title: Swagger Petstore
termsOfService: 'http://swagger.io/terms/'
contact:
email: [email protected]
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
host: petstore.swagger.io
basePath: /v2
schemes:
- https
- http
paths:
/bar:
get:
operationId: getBar
produces:
- application/json
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/Bar'
definitions:
Foo:
type: object
properties:
asdf:
type: string
additionalProperties:
type: object
Bar:
type: object
properties:
foo:
$ref: '#/definitions/Foo'
@thomas-bc
Copy link
Author

This will generate a faulty Bar class with openapi-generator.
With: Java generator, openapi-generator v4.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment