Skip to content

Commit bac04d5

Browse files
committed
Improved yaml for WWI App
1 parent 6178cc2 commit bac04d5

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

  • samples/databases/wide-world-importers/wwi-app/wwwroot

samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,23 @@ paths:
3636
get:
3737
tags:
3838
- "<#= t.Table #>"
39-
summary: "Find information about <#= t.Table #>"
40-
description: "Multiple status values can be provided with comma separated strings"
39+
summary: "Provides information about <#= t.Table #> using OData protocol."
40+
description: "Enables querying <#= t.Table #> information using OData parameters."
4141
operationId: "<#= t.Table #>"
4242
produces:
4343
- "application/json"
4444
parameters:
4545
- name: "$select"
4646
in: "query"
47-
description: "Selecting the properties that should be returned by service"
47+
description: "Selecting the <#= t.Table #> properties that should be returned by service."
4848
required: false
4949
type: "array"
5050
items:
5151
type: "string"
52-
enum:<# foreach(var c in t.ODataColumns.Split(',')) {#>
53-
- "<#= c #>"<# } #>
52+
enum:
53+
<# foreach(var c in t.ODataColumns.Split(',')) {#>
54+
- "<#= c #>"
55+
<# } #>
5456
collectionFormat: "multi"
5557
- name: "$orderby"
5658
in: "query"
@@ -59,29 +61,31 @@ paths:
5961
type: "array"
6062
items:
6163
type: "string"
62-
enum:<# foreach(var c in t.ODataColumns.Split(',')) {#>
64+
enum:
65+
<# foreach(var c in t.ODataColumns.Split(',')) {#>
6366
- "<#= c #>"
6467
- "<#= c #> asc"
65-
- "<#= c #> desc"<# } #>
68+
- "<#= c #> desc"
69+
<# } #>
6670
collectionFormat: "multi"
6771
- name: "$top"
6872
in: "query"
69-
description: "Selecting the properties that should be returned by service"
73+
description: "Selecting the <#= t.Table #> properties that should be returned by the API."
7074
required: false
7175
type: "integer"
7276
- name: "$skip"
7377
in: "query"
74-
description: "Selecting the properties that should be returned by service"
78+
description: "Specify number of <#= t.Table #> records that should be skipped."
7579
required: false
7680
type: "integer"
7781
- name: "$apply"
7882
in: "query"
79-
description: "aggregation function that should be applied on the results"
83+
description: "Aggregation function that should be applied on the results."
8084
required: false
8185
type: "string"
8286
- name: "$filter"
8387
in: "query"
84-
description: "Condition that returned items must satisfy"
88+
description: "Condition that returned <#= t.Table #> items must satisfy. It can contain and, or, not logical operators and lt, le, gt, ge, ne, eq relational operators."
8589
required: false
8690
type: "string"
8791
responses:
@@ -90,12 +94,13 @@ paths:
9094
400:
9195
description: "The OData request is not valid"
9296
500:
93-
description: "Cannot process request"<# } #>
97+
description: "OData service cannot process request"<# } #>
9498
<#+
9599
public class TableDef {
96100
public string Schema {get; set;}
97101
public string Table {get; set;}
98102
public string ODataColumns {get; set;}
99103
public bool IsReadOnly {get; set;}
100104
}
105+
101106
#>

0 commit comments

Comments
 (0)