-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat(*): use modelfile to getType() #742
Conversation
@@ -69,7 +69,8 @@ class MapValueType extends Decorated { | |||
*/ | |||
validate() { | |||
if (!ModelUtil.isPrimitiveType(this.type)) { | |||
const decl = ModelUtil.getTypeDeclaration(this.ast.type.name, this.modelFile); | |||
|
|||
const decl = this.modelFile.getType(this.ast.type.name); | |||
|
|||
// All declarations, with the exception of MapDeclarations, are valid Values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we got a test for enums and scalars as values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Map Key yes. Coverage for imported Scalars as Values I've just added for completeness (the same function is under test).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support Enums as Map types (yet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore this...
Signed-off-by: Jonathan Casey <[email protected]>
Signed-off-by: Jonathan Casey <[email protected]>
Signed-off-by: Jonathan Casey <[email protected]>
81fe1cc
to
d3b2d52
Compare
Signed-off-by: Jonathan Casey <[email protected]>
Description
Gets the type from the ModelFile, removes the utility function.
Author Checklist
--signoff
option of git commit.main
fromfork:branchname