-
Notifications
You must be signed in to change notification settings - Fork 63
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
PDF: support document description in request header #268
base: main
Are you sure you want to change the base?
Conversation
Add `DocumentDescriptionLocation` to support this scenario. Also, make `DocumentDescriptionReference` and `DocumentDescriptionCollection` optional.
@@ -40,11 +40,17 @@ | |||
</Term> | |||
|
|||
<ComplexType Name="FeaturesType"> | |||
<Property Name="DocumentDescriptionReference" Type="Edm.String" Nullable="false"> | |||
<Property Name="DocumentDescriptionLocation" Type="PDF.DocumentDescriptionLocation" DefaultValue="0"> |
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.
Not sure here if value 0
is correct. Would rather like to read it entitySet
.
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.
If this points to an enum, don't we need a value help for it?
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 haven't seen value helps in the other documents either, so would guess this is not a use case here.
For concrete DocumentDescription...
properties, they are not user-facing, but only filled programmatically. One application, for example, will set DocumentDescriptionLocation
to header
, the other will set it to entitySet
. But it's not the user that decides it.
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.
Avoid property DocumentDescriptionLocation
@@ -40,11 +40,17 @@ | |||
</Term> | |||
|
|||
<ComplexType Name="FeaturesType"> | |||
<Property Name="DocumentDescriptionReference" Type="Edm.String" Nullable="false"> | |||
<Property Name="DocumentDescriptionLocation" Type="PDF.DocumentDescriptionLocation" DefaultValue="0"> |
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.
<Property Name="DocumentDescriptionLocation" Type="PDF.DocumentDescriptionLocation" DefaultValue="0"> |
<Property Name="DocumentDescriptionCollection" Type="Edm.String"> | ||
<Annotation Term="Core.Description" String="Name of entity set containing the DocumentDescription" /> | ||
</Property> |
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.
<Property Name="DocumentDescriptionCollection" Type="Edm.String"> | |
<Annotation Term="Core.Description" String="Name of entity set containing the DocumentDescription" /> | |
</Property> | |
<Property Name="DocumentDescriptionCollection" Type="Edm.String"> | |
<Annotation Term="Core.Description" String="Name of entity set containing the DocumentDescription" /> | |
<Annotation Term="Core.LongDescription"> | |
<String>If this is null, the request header 'SAP-Document-Description' must contain the base64-encoded JSON string of the document description.</String> | |
</Annotation> | |
</Property> |
<EnumType Name="DocumentDescriptionLocation"> | ||
<Member Name="entitySet" Value="0"> | ||
<Annotation Term="Core.Description" String="Document description is given as entity set" /> | ||
</Member> | ||
<Member Name="header" Value="1"> | ||
<Annotation Term="Core.Description" String="Document description is given in a request header" /> | ||
</Member> | ||
</EnumType> |
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.
<EnumType Name="DocumentDescriptionLocation"> | |
<Member Name="entitySet" Value="0"> | |
<Annotation Term="Core.Description" String="Document description is given as entity set" /> | |
</Member> | |
<Member Name="header" Value="1"> | |
<Annotation Term="Core.Description" String="Document description is given in a request header" /> | |
</Member> | |
</EnumType> |
Maybe I missed your point, but what do you mean by 'avoid DocumentDescriptionLocation'? It's the very thing I wanted to introduce. |
I think we don't need it if we simply state
|
This is too implicit. We need an explicit parameter for clean design. According to our architect. |
I consider such dependencies between different properties unclean. Better have one complex type |
Add
DocumentDescriptionLocation
to support this scenario.Also, make
DocumentDescriptionReference
andDocumentDescriptionCollection
optional.