[MGNLCT-57] Report empty model properties supplied via YAML maps Created: 06/Sep/18  Updated: 04/Jun/19  Resolved: 18/Dec/18

Status: Closed
Project: Content Types
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Bug Priority: Major
Reporter: Christopher Zimmermann Assignee: Dai Ha
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: 1h
Time Spent: 2d 3h
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Content Types finalization
Sprint: Saigon 160
Story Points: 5

 Description   

If the properties of a model are supplied via the YAML map syntax, and have no sub properties (such as "type" or "i18n"), then the Detail subapp of a created app will not show a field for the property.

And, if none of the properties has a subfield - then the entire Detail subapp will not be created in the app.

Since this can be unexpected, we should log an error when such a definition is detected, and ideally report in the problems view of the definition to.

 

Use the following YAML to reproduce:

contentTypes/bike.yaml

datasource:
  workspace: bikes
  autoCreate: true
model:
  properties:
    title:
    color:

(title and color are supplied via YAML map syntax.)

 

apps/bikes.yaml

!with-type:bike
label: Bikes

 



 Comments   
Comment by Mikaël Geljić [ 28/Sep/18 ]

snippet is equivalent to:

model:
  properties:
    title: null
    color: null

only the dash syntax allows one liners for default string properties; maybe we can find other alternatives too; unlikely to be content-type specific though.

Comment by Christopher Zimmermann [ 13/Dec/18 ]

Since this can be unexpected, we should log an error when such a definition is detected (one with nulls) , and ideally report in the problems view of the definition to.

Generated at Mon Feb 12 00:36:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.