-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{#if (and val.path (not (eq val.type "alias")))}}{{#with (resolve val)}}{{#if (eq this.type "obj")}}{{#if this.adt}}{{>dtoName val=(fmtClass (fmtName ../val.path))}}Base{{else}}{{>dtoName val=(fmtClass ../val.path)}}{{/if}}.get(){{else}}{{>stubImpl val=this indent=indent}}{{/if}}{{/with}}{{else if (or (eq val.type "obj") (or val.vars val.mix))}}{{key}}({{#each val.vars}} | ||
{{#if (not val.type)}}{{key}}(){{else}}{{#if (and val.path (not (eq val.type "alias")))}}{{#with (resolve val)}}{{#if (eq this.type "obj")}}{{#if this.adt}}{{>dtoName val=(fmtClass (fmtName ../val.path))}}Base{{else}}{{>dtoName val=(fmtClass ../val.path)}}{{/if}}.get(){{else}}{{>stubImpl val=this indent=indent}}{{/if}}{{/with}}{{else if (or (eq val.type "obj") (or val.vars val.mix))}}{{key}}({{#each val.vars}} | ||
{{../indent}} {{fmtName @key}}={{>stubImpl val=this key=(fmtClass @key) indent=(add ../indent " ") prefix=../key}}{{#if (or (not @last) ../val.mix)}},{{/if}}{{/each}}{{#each val.mix}} | ||
{{../indent}} **{{#if ../adtVar}}{ k:v for k, v in {{/if}}{{>dtoName val=(fmtClass this.path)}}.get().dict(){{#if ../adtVar}}.items() if k != {{json (fmtName ../adtVar)}} }{{/if}}{{#unless @last}},{{/unless}}{{/each}} | ||
{{indent}}){{else if (eq val.type "map")}}{ {{#if val.key}}{{#if (eq val.key.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{add key "Key"}}.get(){{else}}{{>stubImpl val=val.item indent=indent prefix=null}}{{/if}}{{else}}{{>stubImpl val="str" key=(add key "Key") indent=indent}}{{/if}}: {{#if val.val}}{{#if (eq val.val.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{add key "Val"}}.get(){{else}}{{>stubImpl val=val.val indent=indent prefix=null}}{{/if}}{{else}}{{>stubImpl val="str" key=(add key "Val") indent=indent}}{{/if}} }{{else if (eq val.type "seq")}}[{{#if (eq val.item.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{#if origin}}{{>dtoName val=(fmtClass origin.path)}}{{/if}}{{add key "Item"}}.get(){{else}}{{>stubImpl val=val.item indent=indent prefix=prefix}}{{/if}}]{{else}}{{stubImpl val indent=indent}}{{/if}} | ||
{{indent}}){{else if (eq val.type "map")}}{ {{#if val.key}}{{#if (eq val.key.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{add key "Key"}}.get(){{else}}{{>stubImpl val=val.item indent=indent prefix=null}}{{/if}}{{else}}{{>stubImpl val="str" key=(add key "Key") indent=indent}}{{/if}}: {{#if val.val}}{{#if (eq val.val.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{add key "Val"}}.get(){{else}}{{>stubImpl val=val.val indent=indent prefix=null}}{{/if}}{{else}}{{>stubImpl val="str" key=(add key "Val") indent=indent}}{{/if}} }{{else if (eq val.type "seq")}}[{{#if (eq val.item.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{#if origin}}{{>dtoName val=(fmtClass origin.path)}}{{/if}}{{add key "Item"}}.get(){{else}}{{>stubImpl val=val.item indent=indent prefix=prefix}}{{/if}}]{{else}}{{stubImpl val}}{{/if}}{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{#if (and val.path (not (eq val.type "alias")))}}{{#with (resolve val)}}{{#if (eq this.type "obj")}}{{#if this.adt}}{{>dtoName val=(fmtClass (fmtName ../val.path))}}Base{{else}}{{>dtoName val=(fmtClass ../val.path)}}{{/if}}.get(){{else}}{{>stubImpl val=this indent=indent}}{{/if}}{{/with}}{{else if (or (eq val.type "obj") (or val.vars val.mix))}}{{key}}({{#each val.vars}} | ||
{{#if (not val.type)}}{{key}}(){{else}}{{#if (and val.path (not (eq val.type "alias")))}}{{#with (resolve val)}}{{#if (eq this.type "obj")}}{{#if this.adt}}{{>dtoName val=(fmtClass (fmtName ../val.path))}}Base{{else}}{{>dtoName val=(fmtClass ../val.path)}}{{/if}}.get(){{else}}{{>stubImpl val=this indent=indent}}{{/if}}{{/with}}{{else if (or (eq val.type "obj") (or val.vars val.mix))}}{{key}}({{#each val.vars}} | ||
{{../indent}} {{fmtName @key}}={{>stubImpl val=this key=(fmtClass @key) indent=(add ../indent " ") prefix=../key}}{{#if (or (not @last) ../val.mix)}},{{/if}}{{/each}}{{#each val.mix}} | ||
{{../indent}} **{{#if ../adtVar}}{ k:v for k, v in {{/if}}{{>dtoName val=(fmtClass this.path)}}.get().dict(){{#if ../adtVar}}.items() if k != {{json (fmtName ../adtVar)}} }{{/if}}{{#unless @last}},{{/unless}}{{/each}} | ||
{{indent}}){{else if (eq val.type "map")}}{ {{#if val.key}}{{#if (eq val.key.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{add key "Key"}}.get(){{else}}{{>stubImpl val=val.item indent=indent prefix=null}}{{/if}}{{else}}{{>stubImpl val="str" key=(add key "Key") indent=indent}}{{/if}}: {{#if val.val}}{{#if (eq val.val.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{add key "Val"}}.get(){{else}}{{>stubImpl val=val.val indent=indent prefix=null}}{{/if}}{{else}}{{>stubImpl val="str" key=(add key "Val") indent=indent}}{{/if}} }{{else if (eq val.type "seq")}}[{{#if (eq val.item.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{#if origin}}{{>dtoName val=(fmtClass origin.path)}}{{/if}}{{add key "Item"}}.get(){{else}}{{>stubImpl val=val.item indent=indent prefix=prefix}}{{/if}}]{{else}}{{stubImpl val indent=indent}}{{/if}} | ||
{{indent}}){{else if (eq val.type "map")}}{ {{#if val.key}}{{#if (eq val.key.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{add key "Key"}}.get(){{else}}{{>stubImpl val=val.item indent=indent prefix=null}}{{/if}}{{else}}{{>stubImpl val="str" key=(add key "Key") indent=indent}}{{/if}}: {{#if val.val}}{{#if (eq val.val.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{add key "Val"}}.get(){{else}}{{>stubImpl val=val.val indent=indent prefix=null}}{{/if}}{{else}}{{>stubImpl val="str" key=(add key "Val") indent=indent}}{{/if}} }{{else if (eq val.type "seq")}}[{{#if (eq val.item.type "obj")}}{{#if prefix}}{{prefix}}.{{/if}}{{#if origin}}{{>dtoName val=(fmtClass origin.path)}}{{/if}}{{add key "Item"}}.get(){{else}}{{>stubImpl val=val.item indent=indent prefix=prefix}}{{/if}}]{{else}}{{stubImpl val}}{{/if}}{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ components: | |
type: | ||
type: string | ||
required: | ||
- bool | ||
- type | ||
discriminator: | ||
propertyName: type | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ defs: | |
vars: | ||
bool: | ||
type: bool | ||
opt: true | ||
dec: | ||
type: dec | ||
opt: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters