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

treat referenced type classes in the same way as composition association targets. #113

Open
onthebreeze opened this issue Apr 16, 2020 · 2 comments
Assignees

Comments

@onthebreeze
Copy link
Contributor

refs #109 - please check out the classes like citizenship where some of the attributes have a type called "partialDate". You'll see that this type is defined in the Core Types package and it is essentially a little class with three attributes, day, month, year as separate properties. It is referenced as a type quite frequently throughout the applications api model. However the generator sees this as an unknown type and just replaces it with "string".

In general (and this will help with the CEFACT core types issue too) the generator should just follow these type definitions (whether generating from package or diagram) and should treat them is exactly the same way as a composition relationship - namely create a type for "partialDate" and reference it wherever it is used.

@onthebreeze
Copy link
Contributor Author

Looks ok - I can see that the partialDate type now comes through

{
"jobTitle": "string",
"description": "string",
"startDate": [
{
"Day": "string",
"Month": "string",
"Year": "string"
}
],
"endDate": [
{
"Day": "string",
"Month": "string",
"Year": "string"
}
],
"employer": {
"name": "string",
"taxRegistrationId": "string"
}
}

@onthebreeze
Copy link
Contributor Author

onthebreeze commented Apr 20, 2020

Reopening - there is a bug - the referenced type is shown as an array when it should be an object

So like this

"startDate":
{
"Day": "string",
"Month": "string",
"Year": "string"
},

Not like this

"startDate": [
{
"Day": "string",
"Month": "string",
"Year": "string"
}
],

@onthebreeze onthebreeze reopened this Apr 20, 2020
faizanvahevaria added a commit that referenced this issue Apr 21, 2020
#113 Reference type shown as object insted of array
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

2 participants