From bac04d554b5cdd80129f28b025d9169d184ee602 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Fri, 17 May 2019 13:32:22 +0200 Subject: [PATCH] Improved yaml for WWI App --- .../wwi-app/wwwroot/OData.tt | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt b/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt index 70ee0dc3..d6a490db 100644 --- a/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt +++ b/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt @@ -36,21 +36,23 @@ paths: get: tags: - "<#= t.Table #>" - summary: "Find information about <#= t.Table #>" - description: "Multiple status values can be provided with comma separated strings" + summary: "Provides information about <#= t.Table #> using OData protocol." + description: "Enables querying <#= t.Table #> information using OData parameters." operationId: "<#= t.Table #>" produces: - "application/json" parameters: - name: "$select" in: "query" - description: "Selecting the properties that should be returned by service" + description: "Selecting the <#= t.Table #> properties that should be returned by service." required: false type: "array" items: type: "string" - enum:<# foreach(var c in t.ODataColumns.Split(',')) {#> - - "<#= c #>"<# } #> + enum: +<# foreach(var c in t.ODataColumns.Split(',')) {#> + - "<#= c #>" +<# } #> collectionFormat: "multi" - name: "$orderby" in: "query" @@ -59,29 +61,31 @@ paths: type: "array" items: type: "string" - enum:<# foreach(var c in t.ODataColumns.Split(',')) {#> + enum: +<# foreach(var c in t.ODataColumns.Split(',')) {#> - "<#= c #>" - "<#= c #> asc" - - "<#= c #> desc"<# } #> + - "<#= c #> desc" +<# } #> collectionFormat: "multi" - name: "$top" in: "query" - description: "Selecting the properties that should be returned by service" + description: "Selecting the <#= t.Table #> properties that should be returned by the API." required: false type: "integer" - name: "$skip" in: "query" - description: "Selecting the properties that should be returned by service" + description: "Specify number of <#= t.Table #> records that should be skipped." required: false type: "integer" - name: "$apply" in: "query" - description: "aggregation function that should be applied on the results" + description: "Aggregation function that should be applied on the results." required: false type: "string" - name: "$filter" in: "query" - description: "Condition that returned items must satisfy" + 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." required: false type: "string" responses: @@ -90,7 +94,7 @@ paths: 400: description: "The OData request is not valid" 500: - description: "Cannot process request"<# } #> + description: "OData service cannot process request"<# } #> <#+ public class TableDef { public string Schema {get; set;} @@ -98,4 +102,5 @@ paths: public string ODataColumns {get; set;} public bool IsReadOnly {get; set;} } + #> \ No newline at end of file