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

useReferences semantics #21

Closed
fizruk opened this issue Dec 12, 2015 · 0 comments
Closed

useReferences semantics #21

fizruk opened this issue Dec 12, 2015 · 0 comments
Milestone

Comments

@fizruk
Copy link
Member

fizruk commented Dec 12, 2015

Now that #19 is merged we can change useReferences semantics or even get rid of the option altogether.

Currently useReferences only affects schemas reachable from GToSchema, so e.g. for this type Object is not reachable:

data Objects = Objects [Object]

With declareNamedSchema we can now inline every schema.
Moreover since we have access to all used schemas and we can choose which one to leave and which one to inline after calling declareNamedSchema.

In a bit more general setting, we might implement this function:

-- | Inline schemas with given names and remove them from definitions.
inlineSchemas :: [Text] -> Definitions -> Definitions

This can be useful for tweaking final Swagger spec.

@fizruk fizruk modified the milestone: v1.0 Dec 14, 2015
fizruk referenced this issue Dec 18, 2015
Remove useReferences from SchemaOptions
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

No branches or pull requests

1 participant