Improved yaml for WWI App

This commit is contained in:
Jovan Popovic
2019-05-17 13:32:22 +02:00
parent 6178cc2f62
commit bac04d554b
@@ -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;}
}
#>