mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
What an API page publishes for an enum field depends on the OData schema version: member names under 2.0, the caption as Edm.String under 1.0, never the ordinal. Custom APIs defaulted to 1.0 through BC 23 and to 2.0 from BC 24. LLMs assert one carrier as universal and get one direction wrong. Co-authored-by: waldo1001 <12088142+waldo1001@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
52 lines
1.4 KiB
AL
52 lines
1.4 KiB
AL
// Ordinal 2 was renamed from CreditNote to CreditMemo with ordinal and caption kept. The compiler stays silent
|
|
// and AS0082 fires only against a baseline; every schema 2.0 consumer that filters on or posts CreditNote fails.
|
|
enum 50120 "Document Kind Bad"
|
|
{
|
|
Extensible = true;
|
|
|
|
value(0; Invoice) { Caption = 'Invoice'; }
|
|
value(1; Order) { Caption = 'Order'; }
|
|
value(2; CreditMemo) { Caption = 'Credit Memo'; }
|
|
}
|
|
|
|
table 50121 "Document Header Bad"
|
|
{
|
|
DataClassification = CustomerContent;
|
|
|
|
fields
|
|
{
|
|
field(1; "No."; Code[20]) { DataClassification = CustomerContent; }
|
|
field(2; Kind; Enum "Document Kind Bad") { DataClassification = CustomerContent; }
|
|
}
|
|
|
|
keys
|
|
{
|
|
key(PK; "No.") { Clustered = true; }
|
|
}
|
|
}
|
|
|
|
page 50122 "Document API Bad"
|
|
{
|
|
PageType = API;
|
|
APIPublisher = 'contoso';
|
|
APIGroup = 'documents';
|
|
APIVersion = 'v1.0';
|
|
EntityName = 'document';
|
|
EntitySetName = 'documents';
|
|
ODataKeyFields = SystemId;
|
|
SourceTable = "Document Header Bad";
|
|
DelayedInsert = true;
|
|
|
|
layout
|
|
{
|
|
area(content)
|
|
{
|
|
repeater(records)
|
|
{
|
|
field(id; Rec.SystemId) { Caption = 'id'; Editable = false; }
|
|
field(number; Rec."No.") { Caption = 'number'; }
|
|
field(kind; Rec.Kind) { Caption = 'kind'; }
|
|
}
|
|
}
|
|
}
|
|
}
|