{"ref":"artifact:miyasuta-cap-defaultvalue-function","page":"/artifacts/miyasuta-cap-defaultvalue-function","json":"/artifacts/miyasuta-cap-defaultvalue-function.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"miyasuta-cap-defaultvalue-function","name":"cap-defaultvalue-function","artifact_type":"sample","ecosystem":"cap","domain":"ui-and-frontend-bridge","origin_ring":"independent","description":{"one_line":"`Common.DefaultValuesFunction` pointed at a service function: `getDefaultValues()` selects the highest existing `ID` and returns that plus one, leaving the second key element to the user.","short":"Common.DefaultValuesFunction pointed at a CAP service function","what_it_solves":"`Books` has a two-part key, `ID` and `shop`, with `ID` annotated `@readonly` so nobody types it. The entity is `@odata.draft.enabled`, the function is declared on the service beside it and annotated as the entity's `Common.DefaultValuesFunction`, and its handler orders `Books` by `ID` descending, takes the first row and returns `{ ID: ID + 1 }`, so `shop` stays empty. An app under `app/bookshop`, listed in `sapux`, carries the generated field group and `UI.LineItem` annotations. One commit, from December 2024, and the README is the CAP scaffold's own getting-started text, so the annotation and that handler are the whole of it."},"links":{"repo":"https://github.com/miyasuta/cap-defaultvalue-function"},"identity":{"license":"UNLICENSED"},"compat":{"runtimes":["node"],"cds_range":"^8"},"demonstrates":["capability:fiori-annotations","capability:draft-handling"],"maintainers":["actor:mio-yasutake"],"provenance":{"discovered_via":[{"source":"source:github","channel":"miyasuta"}],"first_seen":"2026-10-08"},"use_as":"reference","contributors":["actor:mio-yasutake"],"drafted_with_ai":true},"effective_normative_relations":[],"readings":{"liveness":[{"label":"Maintenance","tier":"unknown","evidence":"no release data"},{"label":"Continuity","tier":"fair","evidence":"one contributor, personally owned"},{"label":"Repository","tier":"poor","evidence":"pushed 2024-12, not archived"}],"compatibility":[{"label":"Declared for","tier":"poor","evidence":"^8 — stops before cds 9"},{"label":"Survived majors","tier":"unknown","evidence":"no release dates"},{"label":"Maintainer's CI","tier":"fair","evidence":"no CI configured"}],"practice":[{"label":"Tests","tier":"good","evidence":"8 test files"},{"label":"Docs","tier":"poor","evidence":"README 1 KB"},{"label":"Changelog","tier":"fair","evidence":"none in the repo"}],"reach":[{"value":null,"unit":"installs/week"},{"value":0,"unit":"watching"}]},"signals":{"crawled_at":"2026-10-25","npm":"not published under this name","stars":0,"forks":0,"open_issues":0,"archived":false,"pushed_at":"2024-12-30","license_spdx":null,"org_owned":false,"default_branch":"main","created_at":"2024-12-30T20:27:09Z","open_prs":0,"tree_truncated":false,"test_files":8,"workflows":0,"other_ci":false,"readme_bytes":674,"docs_files":0,"changelog":false,"license_file":false,"dts_files":0,"first_commit":"2024-12-30","last_commit":"2024-12-30","commits":1,"contributors":1,"readme_path":"README.md","readme_sha":"dbac29eb1594d1dd9e9cd90a11879f1495caa4b6","repo_read":"2026-10-25"},"edges":{"maintainers":[{"ref":"actor:mio-yasutake","name":"Mio Yasutake","json":"/actors/mio-yasutake.json"}],"contributors":[{"ref":"actor:mio-yasutake","name":"Mio Yasutake","json":"/actors/mio-yasutake.json"}],"explained_by":[],"alternative_to_this":[],"needed_by":[],"available_via":[],"parts":[],"add_ons":[],"answered_through_parts":[]}}