Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Remove extracting reference from field metadata #354

Bangertm opened this issue Jan 2, 2019 · 2 comments


Copy link

commented Jan 2, 2019

Currently the Marshmallow plugin looks for 'ref' key containing a JSON reference path in field. An example from the tests:

class PetSchema(Schema):
    category = fields.Nested(CategorySchema, many=True, ref='#/definitions/Category')

This functionality seems to be redundant with the plugin's ability to store automatically store references. It also seems like it is a more fragile way to pass reference information into the spec.

This code block extracts the reference and can probably be completely removed because the unbound self referencing case does not occur when a schema instance is passed to schema2jsonschema, which is the primary case currently (we could probably enforce that by instancing the schema within schema2jsonschema).

@sloria sloria added this to the 1.0 milestone Jan 11, 2019


This comment has been minimized.

Copy link

commented Jan 25, 2019

I guess you can go for it.

This may also mean removing the use_refs parameter. Not sure.


This comment has been minimized.

Copy link

commented Feb 3, 2019

Done in #363

@sloria sloria closed this Feb 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.