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

Using language keywords should cause a yaml exception #50

Closed
ghost opened this issue Apr 17, 2018 · 3 comments
Closed

Using language keywords should cause a yaml exception #50

ghost opened this issue Apr 17, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 17, 2018

Steps to Reproduce

- name: Example
    required:
      - name: public
        type: string
    initializers:
      - params: ["public"]

Expected
A generation failure with the line/column number pointing to the yaml so its easy to figure out which param is incorrect and why

Actual
A compilation failure in the generated code

@kormide
Copy link
Owner

kormide commented Apr 17, 2018

Thanks for pointing this out! I'll have to add validation against language-specific keywords.

@kormide
Copy link
Owner

kormide commented May 27, 2018

This is a tough one as I'd have to prevent keywords from all supported languages, including those that may be supported in the future. I tempted to just auto-rename strings that are keywords that would cause code errors whenever a case like this occurs.

@kormide
Copy link
Owner

kormide commented Nov 15, 2018

Fixed in afad9c6.

@kormide kormide closed this as completed Nov 15, 2018
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