j-d-carmichael / boats

Beautiful Open Api Template System
MIT License
57 stars 8 forks source link

[FEATURE] Helper to make referenced object properties optional #18

Closed celleb closed 4 years ago

celleb commented 4 years ago

Given a definition:

post.yml

type: object
required:
  - name
  - coordinates
properties:
  name:
    type: string
  coordinates:
    type: array
    items:
      type: string

The helper should allow me to include it another definition with all the properties made optional.

i.e the result of using the helper will be something like this:

patch.yml

type: object
properties:
  name:
    type: string
  coordinates:
    type: array
    items:
      type: string