-
Notifications
You must be signed in to change notification settings - Fork 71
DDLS: Add "External Entity" #708
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
Conversation
2c3b7ac to
d749248
Compare
|
Adding a new value to an enum is technically incompatible, if no default is defined for the type (see here).
Is it possible to add a default value for |
Interesting. We will add more and more of these source types once we "invent" new types.
We could add "initial" as a default value though. How should be proceed? |
Maybe, some background information, why we declared this as incompatible change. How shall the system behave, if a user would port a DDLS object with a source type that is unknown in the target system, what information shall be stored in this system. If this should be "initial" or "notDefined", this is fine if your object type can handle this. In basically most cases, it was fine to set it to the most common value.
I think this would be fine. As mentioned above "notDefined" might be also a possible value. I have no strong opinion on this. |
Yes that should be possible. The source type states which kind of statement is in the source code (DEFINE VIEW, EXTEND VIEW, ...) So if you import a DDLS with a source type that the system does not (yet) know because that source type / kind of statement was added in a later release the following would happen.
There is no "most common value" for this attribute in this case. |
Then I suggest to go for this. If the ABAP field is set to the default value, it won't be serialized in the JSON, since it is not a required field. I think this makes also sense, in your case 👍 |
Currently it's mandatory So do you propose to change it to no longer be mandatory? |
Sorry, I somehow missed this. I think I wouldn't change the mandatory annotation, if this is not really beneficial. During serialization it would end up with "notDefined" (or similar) in the JSON representation. |
|
I added "unknown" as additional value for source type |
schneidermic0
left a comment
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.
Thanks, @BeckerWdf. Looks good to me.
I will ask @Markus1812 to re-review this change, too.
|
Thanks for the update and the new
Below When generating a new schema, this should then also include the new default value. |
done |
| "! <p class="shorttext">Source Origin</p> | ||
| "! Source origin | ||
| "! $values {@link zif_aff_ddls_v1.data:co_source_origin} | ||
| "! $default {@link zif_aff_ddls_v1.data:co_source_type.unknown} |
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.
I guess you want to set the default for ty_source_type (not ty_source_origin), don't you?
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.
🙈
Source type can also be "External Entity".
schneidermic0
left a comment
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.
Looks good to me, now. :)
Markus1812
left a comment
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.
Thanks for the update
Source type can also be "External Entity"