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

Added docu for @Common.FieldControl validation #1474

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cds/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ Intrinsically supported OData Annotations:
| `@Core.IsMediaType` | see [Media Data](../guides/providing-services#serving-media-data) |
| `@Core.IsUrl` | see [Media Data](../guides/providing-services#serving-media-data) |
| `@Capabilities...` | see [Fiori](../advanced/fiori) |
| `@Common.FieldControl` | see [Input Validation](../guides/providing-services#input-validation)) |
| `@Common.FieldControl` | see [Input Validation](../guides/providing-services#common-fieldControl) |
6 changes: 6 additions & 0 deletions guides/providing-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,12 @@ entity Foo {
```


### `@Common.FieldControl` {#common-fieldControl}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather add that after @mandatory/readonly section as this belongs together.
In addition, we could add that as a warning that numeric and dynamic values are not evaluated by the runtime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johannes-vogel I thought it is good to be added right before 'Custom logic' ,as if they are numeric the customer has to use the custom logic.


The input validation for `@Common.FieldControl: #Mandatory` and `@Common.FieldControl: #ReadOnly` is done from the CAP runtimes automatically.
The input validation for `@Common.FieldControl` with static or dynamic numeric values(e.g. `@Common.FieldControl: 1` or `@Common.FieldControl: integer_field` ) has to be done by custom implementation.
mariayord marked this conversation as resolved.
Show resolved Hide resolved



## Custom Logic

Expand Down
Loading