-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6dfb748
commit dc21cec
Showing
5 changed files
with
1,546 additions
and
1 deletion.
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 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"openapi": "3.0.0", | ||
"servers": [ | ||
{ | ||
"url": "http://api.nyata.com/v1", | ||
"description": "Production server version 1" | ||
}, | ||
{ | ||
"url": "http://staging-api.example.com", | ||
"description": "Staging server" | ||
} | ||
], | ||
"info": { | ||
"description": "This is a server of Tabloid Nyata.\n", | ||
"version": "0.1.0", | ||
"title": "Tabloid Nyata Advertising", | ||
"termsOfService": "http://www.ooolabs.id/tabloid-nyata-terms/", | ||
"contact": { | ||
"email": "[email protected]" | ||
}, | ||
"license": { | ||
"name": "Proprietary license", | ||
"url": "http://www.ooolabs.id/license/" | ||
} | ||
}, | ||
"tags": [ | ||
{ | ||
"name": "membership", | ||
"description": "Everything about user, group, and role" | ||
} | ||
], | ||
"paths": { | ||
"/membership": { | ||
"$ref": "https://gist.githubusercontent.com/3mp3ri0r/307fa6314ad5a9e31a8ac9f04273a272/raw/1c7e1ba47f6a57861a41320a6f2a962352f2ac6a/membershipGetJson.json" | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,208 @@ | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"title": "Co-Operative Work Programmming Interface", | ||
"version": "1.0.0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost:9000" | ||
} | ||
], | ||
"paths": { | ||
"/tasks": { | ||
"post": { | ||
"summary": "Assign work to be performed", | ||
"requestBody": { | ||
"description": "Description of the work to be performed", | ||
"content": { | ||
"application/json;profile=http://acme.com/schemas/sow": { | ||
"schema": { | ||
"$ref": "#/components/schemas/statementOfWork" | ||
}, | ||
"examples": { | ||
"default": { | ||
"$ref": "#/components/examples/statementOfWork" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"description": "New task created successfully.", | ||
"headers": { | ||
"Content-Location": { | ||
"schema": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"get": { | ||
"summary": "Retreive a list of tasks a service has been asked to perform", | ||
"responses": { | ||
"200": { | ||
"description": "A list of tasks a service has been asked to peform", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/statementOfWork" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/tasks/{id}": { | ||
"get": { | ||
"parameters": [ | ||
{ | ||
"name": "id", | ||
"in": "path", | ||
"required": true, | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "A document describing a statement of work", | ||
"content": { | ||
"application/json;profile=http://acme.com/schemas/sow": { | ||
"schema": { | ||
"$ref": "#/components/schemas/statementOfWork" | ||
}, | ||
"examples": { | ||
"default": { | ||
"$ref": "#/components/schemas/statementOfWork" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/capacity": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "List of skills and the available capacity", | ||
"content": { | ||
"application/json;profile=https://acme.com/schemas/worklist": { | ||
"schema": { | ||
"$ref": "#/components/schemas/workList" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"statementOfWork": { | ||
"type": "object", | ||
"properties": { | ||
"statementOfWork": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"description": { | ||
"type": "string" | ||
}, | ||
"requiredSkills": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"estimatedWork": { | ||
"$ref": "#/components/schemas/workList" | ||
}, | ||
"dueDateTime": { | ||
"type": "string", | ||
"format": "DateTime" | ||
}, | ||
"completedWork": { | ||
"$ref": "#/components/schemas/workList" | ||
}, | ||
"status": { | ||
"enum": [ | ||
"Active", | ||
"Completed", | ||
"Waiting", | ||
"Cancelled" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"description" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"workItem": { | ||
"type": "object", | ||
"properties": { | ||
"skill": { | ||
"type": "string" | ||
}, | ||
"minutes": { | ||
"type": "number" | ||
} | ||
} | ||
}, | ||
"workList": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/workItem" | ||
} | ||
} | ||
}, | ||
"examples": { | ||
"statementOfWork": { | ||
"summary": "A description of work that needs to be performed", | ||
"value": { | ||
"description": "Do this stuff for me", | ||
"requiredSkills": [ | ||
"dance", | ||
"sing", | ||
"limbo" | ||
], | ||
"estimatedWork": [ | ||
{ | ||
"skill": "dance", | ||
"minutes": 3 | ||
}, | ||
{ | ||
"skill": "sing", | ||
"minutes": 7 | ||
}, | ||
{ | ||
"skill": "limbo", | ||
"minutes": 1 | ||
} | ||
], | ||
"dueDateTime": "2017-10-22 10:45am", | ||
"completedWork": [ | ||
{ | ||
"skill": "dance", | ||
"minutes": 2 | ||
} | ||
], | ||
"status": "Active" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.