Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Add additional key for items of type array in order to make swagger spec valid #21

Merged
merged 1 commit into from
Oct 20, 2016

Conversation

angvp
Copy link

@angvp angvp commented Oct 17, 2016

Add additional key for items of type array with the type of each element we will default to 'string' right now in order to make our swagger spec
valid.


Closes #20

if field.type == 'array':
schema_property['items'] = {'type': 'string'}
else:
schema_property['type'] = 'string'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be neater as...

...
    'type': field.type or 'string'  # Leave this as it currently is.
}
if field.type == 'array':
    schema_property['items'] = {'type': 'string'}

That'd be a slightly more minimal change.

Otherwise looks good.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, doing those changes now!, i'll update the pr

we will default to 'string' right now in order to make our swagger spec
valid.
@angvp
Copy link
Author

angvp commented Oct 18, 2016

@tomchristie is fixed, travis is failing because I missed the quotes .. I've done push + force on my branch but it seems travis doesn't play well with that, I think you can run travis manually anyway.

@tomchristie
Copy link
Contributor

Build restarted.

@angvp
Copy link
Author

angvp commented Oct 19, 2016

@tomchristie seems ready to merge!

@tomchristie tomchristie merged commit f914daa into core-api:master Oct 20, 2016
@tomchristie
Copy link
Contributor

Thanks @angvp!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants