Skip to content

Instantly share code, notes, and snippets.

@ponelat
Created July 5, 2021 14:46
Show Gist options
  • Select an option

  • Save ponelat/ad5b2c826f517dd3dda16e4bb2dac281 to your computer and use it in GitHub Desktop.

Select an option

Save ponelat/ad5b2c826f517dd3dda16e4bb2dac281 to your computer and use it in GitHub Desktop.
additional-prop-with-example
openapi: 3.0.0
info:
version: abc
title: Showing a generated example for `additionalProperties`
paths:
/foo:
get:
description: ok
responses:
default:
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/WithAdditionalProps'
/bar:
get:
description: ok
responses:
default:
description: ok
content:
application/json:
example:
i-am-static: okay
one: foo
two: bar
three: baz
schema:
$ref: '#/components/schemas/WithAdditionalProps'
components:
schemas:
WithAdditionalProps:
type: object
properties:
i-am-static:
type: string
additionalProperties:
type: object
properties:
one:
type: string
two:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment