Last active
January 5, 2016 01:29
-
-
Save aztecrex/b136b192767e5b2ad46d to your computer and use it in GitHub Desktop.
identity-access-spec
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
{ | |
"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