Skip to content

Conversation

@Pita
Copy link

@Pita Pita commented Nov 13, 2017

This marks object properties as optional unless they are explicitly marked as required in the swagger file.

So this:

mytype: 
  required: 
    - foo
  properties:
    - foo
      - type: string
    - bar
      - type: string

now becomes this (notice the question mark)

type mytype = {
    'foo': string
    'bar' ? : string
};

@wcandillon wcandillon merged commit 4c434e9 into wcandillon:master Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants