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

Cannot add annotation on AliasTypeDef #50

Closed
joejoe321321 opened this issue Jul 19, 2017 · 0 comments
Closed

Cannot add annotation on AliasTypeDef #50

joejoe321321 opened this issue Jul 19, 2017 · 0 comments
Assignees
Labels

Comments

@joejoe321321
Copy link
Contributor

joejoe321321 commented Jul 19, 2017

Hi, the newest rdl cannot generate json correctly when adding annotation after alias type definition.

example rdl:

namespace com.yahoo.apex.parsec;
name apex;
version 1;

type DateTime string (x_date_time)

type Response struct {
DateTime dateTime;
}

If we generate json with the newest rdl, we will get:
*** Error(error.rdl:8): Recursively typed fields must be optional: field 'dateTime' in struct Response

Furthermore, if we put (optional) after field dateTime, the generated json seems not correct, either.

example:
"AliasTypeDef": { "type": "___forward_reference___", "name": "DateTime" }

Is an annotation on alias type still a legal format?
Thank you.

@boynton boynton added the bug label Jul 19, 2017
@boynton boynton self-assigned this Jul 19, 2017
boynton pushed a commit that referenced this issue Jul 19, 2017
Issue #50. Happened when a string alias type (with no actual type
restrictions occurred) was annotated.
boynton added a commit that referenced this issue Jul 19, 2017
Issue #50. Happened when a string alias type (with no actual type
restrictions occurred) was annotated.
@boynton boynton closed this as completed Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants