forked from swagger-api/swagger-editor
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix download json&yaml bug and remove google analytics
- Loading branch information
Showing
6 changed files
with
166 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,105 @@ | ||
# Example YAML to get you started quickly. | ||
# Be aware that YAML has indentation based scoping. | ||
# Code completion support is available so start typing for available options. | ||
swagger: '2.0' | ||
# This YAML file lays out the full definition of what a model-first YAML file can contain. | ||
|
||
# This is your document metadata | ||
info: | ||
version: "0.0.0" | ||
title: <enter your title> | ||
|
||
# Describe your paths here | ||
paths: | ||
# This is a path endpoint. Change it. | ||
/persons: | ||
# This is a HTTP operation | ||
get: | ||
# Describe this verb here. Note: you can use markdown | ||
description: | | ||
Gets `Person` objects. | ||
Optional query param of **size** determines | ||
size of returned array | ||
# This is array of GET operation parameters: | ||
parameters: | ||
# An example parameter that is in query and is required | ||
- | ||
name: size | ||
in: query | ||
description: Size of array | ||
required: true | ||
type: number | ||
format: double | ||
# Expected responses for this operation: | ||
responses: | ||
# Response code | ||
200: | ||
description: Successful response | ||
# A schema describing your response object. | ||
# Use JSON Schema format | ||
schema: | ||
title: ArrayOfPersons | ||
type: array | ||
items: | ||
title: Person | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
single: | ||
type: boolean | ||
# 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: support@example.io | ||
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: EntityType # Required. | ||
# Operation | ||
- name: QueryFunction # Required. | ||
params: # Optional | ||
- name: userId # Required. | ||
type: int32 # 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: BaseType | ||
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 | ||
# Entity type | ||
- name: EntityType # Required. | ||
key: # Required. | ||
- name: id # Optional | ||
baseType: BaseType # 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. | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters