forked from swagger-api/swagger-editor
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathguide.yaml
113 lines (110 loc) · 4.66 KB
/
guide.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# This YAML file lays out the full definition of what a model-first YAML file can contain.
# The api section defines metadata about the service - name, contact info, etc.
api: # Required
name: REST API Name # Required
version: # Optional
current: 1.0.0
description: This REST API does something amazing! # Optional
namespace: "REST.API.Namespace" # Optional, default generated from the name
host: services.example.org # Optional
basePath: /base/path # Optional. Or rootUrl to replace host and basePath
termsOfService: http://example.org/tos # Optional
contact: # Optional
name: API Support
url: http://www.example.io/support
email: [email protected]
license: # Optional
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
auth: Basic # Optional
conformance: minimal # Optional
supportsFilterFunctions: [contains, endswith, startswith, length, indexof, substring, tolower, toupper, trim, concat, year, month, day, hour, minute, second, round, floor, ceiling, cast, isof] # Optional
root: # Required.
# Collection
- name: EntitySet # Required.
type: EntityType[] # Required.
allows: [read, create, update, delete] # Optional
searchable: true # Optional
insertable: true # Optional
deletable: false # Optional
concurrencyProperties: concurrency # Optional. Data modification requires the use of ETags.
disallowNavigation: navigationProperty # Optional
disallowInsert: [navigationProperty] # Optional
# Singleton
- name: Singleton # Required.
type: ChildType # Required.
# Operation
- name: QueryFunction # Required.
params: # Optional
- name: userId # Required.
type: integer # Optional. Default string.
returns: EntityType[] # Required.
- name: ExecuteAction
params: # Optional
- name: parameterName # Required.
type: int32 # Optional. Default string.
# The types section defines types used the service.
types: # Required.
# Enumeration type
- name: EnumType # Required.
members: # Required.
- name: none
value: 0 # Optional
- name: enum1
value: 1 # Optional
- name: enum2
value: 2 # Optional
# Complex type
- name: ComplexType
requiredProperties: # Optional
- name: requiredProperty # Required.
type: string # Optional
optionalProperties: # Optional
- name: optionalProperty # Required. Default string type
# Entity type
- name: EntityType # Required.
key: # Required.
- name: id # Optional
dynamic: true # Optional. dynamic type allows clients to add properties dynamically to instances of the type by specifying uniquely named values in the payload used to insert or update an instance of the type.
requiredProperties: # Optional
- name: name # Required.
type: string # Optional
- name: enumProperty # Required.
type: EnumType # Optional
- name: location # Required.
type: geographypoint # Optional
optionalProperties: # Optional
- name: concurrency # Required.
type: int64 # Optional
computed: true # Optional。 A value for this property is generated on both insert and update
- name: navigationProperty # Required.
type: AnotherEntityType # Optional
containsTarget: true # Optional. Containment navigation properties define an implicit entity set for each instance of its declaring entity type. This implicit entity set is identified by the read URL of the navigation property for that entity.
- name: complexTypeProperty # Required.
type: ComplexType # Required
operations: # Optional
- name: BoundOperation # Required.
params: # Optional
- name: parameterName # Required.
type: string # Optional
returns: EntityType # Optional
- name: AnotherEntityType # Required.
key: Id # Required.
hasStream: false # Optional. A value of true specifies that the entity type is a media entity.
requiredProperties: # Optional
- name: name # Required.
type: string # Optional
computed: false # Optional
operations: # Optional
- name: BoundToContainedType # Required.
params: # Optional
- name: parameterName # Required.
type: string # Optional
returns: AnotherEntityType # Optional
- name: ChildType
baseType: EntityType # Optional
requiredProperties: # Optional
- name: price # Required.
type: decimal # Optional
isoCurrency: USD # Optional. The currency for this monetary amount as an ISO 4217 currency code
immutable: true # Optional. A value for this non-key property can be provided on insert and remains unchanged on update