core-api / python-raml-codec

A RAML codec for Core API.
Other
3 stars 3 forks source link

Field.type depricated in coreapi in favour of schema #12

Closed keyz182 closed 4 years ago

keyz182 commented 7 years ago

Get the field type by first checking if there's a field.type, or if no field.type, using the coreapi SCHEMA_CLASS_TO_TYPE_ID mapping to map the schema object.

Bump the coreapi version to 2.2.4 to get access to SCHEMA_CLASS_TO_TYPE_ID.

This seems to be the source of this issue (https://github.com/tomchristie/django-rest-raml/issues/9), as type is None, the output then contains type: none which doesn't appear to be valid RAML.

I'm not sure if defaulting to anything is correct, and maybe as type is depricated, that should be fallback, not the first thing checked?