Skip to content

Instantly share code, notes, and snippets.

@aztecrex
Last active January 5, 2016 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aztecrex/b136b192767e5b2ad46d to your computer and use it in GitHub Desktop.
Save aztecrex/b136b192767e5b2ad46d to your computer and use it in GitHub Desktop.
identity-access-spec
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "CJ Identity and Access Service",
"description": "Services for registering and authenticating developers and apps",
"termsOfService": "http://developers.cj.com/tbd",
"contact": {
"name": "CJ Engineering",
"url": "http://developers.cj.com/"
},
"license": {
"name": "MIT"
}
},
"tags": [{
"name": "developer",
"description": "Developer registration and management"
}],
"paths": {
"/developers": {
"post": {
"description": "Collection of all CJ developers",
"tags": ["developer"],
"consumes": [
"application/json",
"application/vnd.cj.ia+json"
],
"produces": [
"application/json",
"application/vnd.cj.ia+json"
],
"parameters": [{
"name": "developer",
"in": "body",
"description": "Developer to register",
"required": true,
"schema": {
"$ref": "#/definitions/DeveloperSpec"
}
}],
"responses": {
"201": {
"description": "Created developer entity",
"schema": {
"$ref": "#/definitions/Developer"
}
},
"400": {
"description": "Submission error",
"schema": {
"$ref": "#/definitions/SubmissionError"
}
},
"default": {
"description": "General errors",
"schema": {
"$ref": "#/definitions/GeneralError"
}
}
}
}
}
},
"definitions": {
"DeveloperBase": {
"properties": {
"fullName": {
"description": "Developer full name for correspondence",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"emailAddress": {
"description": "Developer email address, excluding friendly name",
"type": "string",
"minLength": 7,
"maxLength": 300
}
},
"required": [
"fullName",
"emailAddress"
]
},
"DeveloperSpec": {
"description": "Proposed developer account specification",
"allOf": [{
"$ref": "#/definitions/DeveloperBase"
}, {
"properties": {
"password": {
"type": "string",
"description": "Initial account password"
}
},
"required": [
"password"
]
}]
},
"Developer": {
"description": "Proposed developer account specification",
"allOf": [{
"$ref": "#/definitions/DeveloperBase"
}, {
"properties": {
"_links": {
"$ref": "#/definitions/Links"
}
},
"required": [
"_links"
]
}]
},
"SubmissionError": {},
"GeneralError": {},
"Links": {
"description": "References to related resources",
"properties": {}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment