API
Summary
The API is a path and operations.
Description
The path and operations are required.
Fields
| Field Name | Type | Since Version | Description |
|---|---|---|---|
name |
String | The name of the REST API Method. This contains the exposed path. | |
operations |
[Operation] | The list of operations that can be performed on path | |
path |
String | The API path | |
id |
String | An identifier | |
ref |
String | A Reference to a definition on defitions object | |
title |
String | Shema title | |
description |
String | Description about the Schema | |
defaultValue |
Object | Default value for this schema if it is applicable | |
type |
String | The type ex: array , boolean, integer , null , number, object, string | |
format |
String | The format ex: int32, int64, float, double, byte, binary, date, date-time or password | |
required |
[String] | Specifies if the paramater is required | |
properties |
{String, SchemaObject} | Not used beacause our model does not support inline nested types | |
items |
SchemaObject | if the schema is an array specifies the items type | |
example |
Object | if the schema is an array specifies the items type | |
exclusiveMinimum |
Boolean | ||
maxLength |
Int | ||
minLength |
Int | ||
pattern |
String | ||
maxItems |
Int | ||
minItems |
Int | ||
uniqueItems |
Boolean | ||
multipleOf |
Int | ||
collectionFormat |
String | ||
enumList |
[String] | ||
discriminator |
String | none |
Example JSON
{
"id" : "",
"format" : "",
"path" : "/users",
"name" : "",
"operations" : [ {
"id" : "",
"format" : "",
"httpMethod" : "GET",
"nickname" : "getUserById",
"summary" : "Gets a user by ID",
"notes" : "If the user does not exist, then a *404 Not Found* error is returned",
"responseClass" : "User",
"errorResponses" : [ {
"id" : "",
"format" : "",
"code" : 404,
"reason" : "Not Found",
"$ref" : "#/definitions/User",
"type" : "string"
} ],
"consumes" : [ "\"application/json\"" ],
"produces" : [ "\"application/json\"" ],
"authorizations" : { },
"tags" : {
"Category" : [ "Social Network", "Photos" ],
"Type" : [ "REST" ],
"Department" : [ "Development" ]
},
"securityProfile" : {
"devices" : [ {
"type" : "APIKeyOnlySecurityDevice",
"typeDisplayName" : "API Key only",
"name" : "API Key Device",
"order" : 1,
"keyField" : "KeyId"
}, {
"type" : "HTTPBasicSecurityDevice",
"typeDisplayName" : "HTTP Basic Authentication",
"name" : "HTTP Basic Device",
"order" : 0,
"realm" : "axway"
} ]
},
"documentationUrl" : "http://api.acme.com/docs#method",
"cors" : true,
"parameters" : [ {
"id" : "",
"format" : "",
"required" : true,
"name" : "userId",
"dataType" : "string",
"paramType" : "body",
"allowMultiple" : false,
"$ref" : "#/definitions/User",
"defaultValue" : "Sample Value",
"type" : "string"
} ],
"$ref" : "#/definitions/User",
"type" : "User"
} ],
"$ref" : "#/definitions/User",
"type" : "string"
}