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

Use AstSchemaBuilder from args rather the default one #420

Closed

Conversation

Axxiss
Copy link

@Axxiss Axxiss commented Nov 21, 2018

On the current implementation definitions(document, builder) doesn't use the builder argument at all and instead always use AstSchemaBuilder.default. So this PR make use of the custom builder and pass to the AstSchemaMaterializer as an argument.

 // This implementation provides the default AstSchemaBuilder
  def definitions(document: ast.Document): Vector[Named] =
    definitions[Any](document, AstSchemaBuilder.default)

 // Here we accept a custom AstSchemaBuilder as an argument but we don't use it. We use the default one instead
  def definitions[Ctx](document: ast.Document, builder: AstSchemaBuilder[Ctx]): Vector[Named] =
    new AstSchemaMaterializer[Ctx](document, AstSchemaBuilder.default).definitions

@travisbrown
Copy link
Contributor

@Axxiss This change looks reasonable to me. Would you be interested in migrating this PR to the new GitHub organisation for review?

@Axxiss
Copy link
Author

Axxiss commented Nov 4, 2019

Moving the PR to the new orga 👍

@Axxiss Axxiss closed this Nov 4, 2019
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.

None yet

2 participants