Skip to content

Instantly share code, notes, and snippets.

@kopf
Last active January 4, 2017 20:37
Show Gist options
  • Save kopf/18742797310fa75028017628fda5e334 to your computer and use it in GitHub Desktop.
Save kopf/18742797310fa75028017628fda5e334 to your computer and use it in GitHub Desktop.
definitions:
Pet:
type: object
properties:
name:
type: string
owner:
type: string
CreatePetRequest:
allOf:
- $ref: '#/definitions/Pet'
required:
- name
- owner
UpdatePetRequest:
allOf:
- $ref: '#/definitions/Pet'
###
# also doesn't work:
CreatePetRequest:
allOf:
- $ref: '#/definitions/Pet'
required:
- $ref: '#/definitions/Pet/properties/name'
- $ref: '#/definitions/Pet/properties/owner'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment