Skip to content

Instantly share code, notes, and snippets.

@rzane
Created January 10, 2019 15:55
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 rzane/99f6106c72bead20faf39c8ad004c4d0 to your computer and use it in GitHub Desktop.
Save rzane/99f6106c72bead20faf39c8ad004c4d0 to your computer and use it in GitHub Desktop.
Reproduce OpenAPI additionalProperties issue
openapi: 3.0.0
info:
title: MyAPI
description: MY API
version: 0.0.0
servers:
- url: http://localhost:8080/api/
paths:
/example:
get:
operationId: getExample
responses:
"200":
description: "Success"
content:
application/json:
schema:
$ref: "#/components/schemas/Example"
components:
schemas:
Example:
type: object
required:
- items
properties:
items:
type: object
additionalProperties:
type: object
required:
- name
properties:
name:
type: string
{
"scripts": {
"generate": "openapi-generator generate -i openapi.yaml -o src -g typescript-fetch",
"test": "tsc -p src --noEmit"
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "^0.0.7-4.0.0-beta",
"typescript": "^3.2.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment