| { |
| "swagger" : "2.0", |
| "info" : { |
| "description" : "Rest API Documentation", |
| "version" : "v1.0, build #${buildNumber}", |
| "title" : "Rest API", |
| "termsOfService" : "http://www.github.com/kongchen/swagger-maven-plugin" |
| }, |
| "basePath" : "/activityspec-api", |
| "tags" : [ { |
| "name" : "Activity Specs" |
| } ], |
| "schemes" : [ "http" ], |
| "paths" : { |
| "/v1.0/activity-spec" : { |
| "get" : { |
| "tags" : [ "Activity Specs" ], |
| "summary" : "Get list of activity specs ", |
| "description" : "", |
| "operationId" : "list", |
| "consumes" : [ "application/json" ], |
| "produces" : [ "application/json" ], |
| "parameters" : [ { |
| "name" : "status", |
| "in" : "query", |
| "description" : "Currently supported values: 'Certified' - only activity specs with Certified status", |
| "required" : false, |
| "type" : "string" |
| }, { |
| "name" : "USER_ID", |
| "in" : "header", |
| "required" : false, |
| "type" : "string", |
| "default" : "" |
| } ], |
| "responses" : { |
| "default" : { |
| "description" : "successful operation" |
| } |
| } |
| }, |
| "post" : { |
| "tags" : [ "Activity Specs" ], |
| "summary" : "Create Activity Spec", |
| "description" : "", |
| "operationId" : "createActivitySpec", |
| "consumes" : [ "application/json" ], |
| "produces" : [ "application/json" ], |
| "parameters" : [ { |
| "in" : "body", |
| "name" : "body", |
| "required" : false, |
| "schema" : { |
| "$ref" : "#/definitions/ActivitySpecRequest" |
| } |
| }, { |
| "name" : "USER_ID", |
| "in" : "header", |
| "required" : false, |
| "type" : "string", |
| "default" : "" |
| } ], |
| "responses" : { |
| "default" : { |
| "description" : "successful operation" |
| } |
| } |
| } |
| }, |
| "/v1.0/activity-spec/{id}/versions/{versionId}" : { |
| "get" : { |
| "tags" : [ "Activity Specs" ], |
| "summary" : "Get Activity Spec", |
| "description" : "", |
| "operationId" : "getActivitySpec", |
| "consumes" : [ "application/json" ], |
| "produces" : [ "application/json" ], |
| "parameters" : [ { |
| "name" : "id", |
| "in" : "path", |
| "description" : "Activity Spec Id", |
| "required" : true, |
| "type" : "string" |
| }, { |
| "name" : "versionId", |
| "in" : "path", |
| "description" : "Version Id", |
| "required" : true, |
| "type" : "string" |
| }, { |
| "name" : "USER_ID", |
| "in" : "header", |
| "required" : false, |
| "type" : "string", |
| "default" : "" |
| } ], |
| "responses" : { |
| "default" : { |
| "description" : "successful operation" |
| } |
| } |
| }, |
| "put" : { |
| "tags" : [ "Activity Specs" ], |
| "summary" : "Update Activity Spec", |
| "description" : "", |
| "operationId" : "updateActivitySpec", |
| "consumes" : [ "application/json" ], |
| "produces" : [ "application/json" ], |
| "parameters" : [ { |
| "in" : "body", |
| "name" : "body", |
| "required" : false, |
| "schema" : { |
| "$ref" : "#/definitions/ActivitySpecRequest" |
| } |
| }, { |
| "name" : "id", |
| "in" : "path", |
| "description" : "Activity Spec Id", |
| "required" : true, |
| "type" : "string" |
| }, { |
| "name" : "versionId", |
| "in" : "path", |
| "description" : "Version Id", |
| "required" : true, |
| "type" : "string" |
| }, { |
| "name" : "USER_ID", |
| "in" : "header", |
| "required" : false, |
| "type" : "string", |
| "default" : "" |
| } ], |
| "responses" : { |
| "default" : { |
| "description" : "successful operation" |
| } |
| } |
| } |
| }, |
| "/v1.0/activity-spec/{id}/versions/{versionId}/actions" : { |
| "put" : { |
| "tags" : [ "Activity Specs" ], |
| "summary" : "Actions on a activity spec", |
| "description" : "Performs one of the following actions on a activity spec: |Submit: Finalize its active version.|Deprecate: Deprecate activity spec.|", |
| "operationId" : "actOnActivitySpec", |
| "consumes" : [ "application/json" ], |
| "produces" : [ "application/json" ], |
| "parameters" : [ { |
| "in" : "body", |
| "name" : "body", |
| "required" : false, |
| "schema" : { |
| "$ref" : "#/definitions/ActivitySpecActionRequestDto" |
| } |
| }, { |
| "name" : "id", |
| "in" : "path", |
| "description" : "Activity Spec Id", |
| "required" : true, |
| "type" : "string" |
| }, { |
| "name" : "versionId", |
| "in" : "path", |
| "description" : "Version Id", |
| "required" : true, |
| "type" : "string" |
| }, { |
| "name" : "USER_ID", |
| "in" : "header", |
| "required" : false, |
| "type" : "string", |
| "default" : "" |
| } ], |
| "responses" : { |
| "default" : { |
| "description" : "successful operation" |
| } |
| } |
| } |
| } |
| }, |
| "definitions" : { |
| "ActivitySpecActionRequestDto" : { |
| "type" : "object", |
| "properties" : { |
| "action" : { |
| "type" : "string", |
| "enum" : [ "Certify", "Deprecate", "Delete" ] |
| } |
| } |
| }, |
| "ActivitySpecParameterDto" : { |
| "type" : "object", |
| "properties" : { |
| "name" : { |
| "type" : "string" |
| }, |
| "type" : { |
| "type" : "string" |
| }, |
| "value" : { |
| "type" : "string" |
| } |
| } |
| }, |
| "ActivitySpecRequest" : { |
| "type" : "object", |
| "properties" : { |
| "name" : { |
| "type" : "string" |
| }, |
| "description" : { |
| "type" : "string" |
| }, |
| "categoryList" : { |
| "type" : "array", |
| "items" : { |
| "type" : "string" |
| } |
| }, |
| "inputParameters" : { |
| "type" : "array", |
| "items" : { |
| "$ref" : "#/definitions/ActivitySpecParameterDto" |
| } |
| }, |
| "outputParameters" : { |
| "type" : "array", |
| "items" : { |
| "$ref" : "#/definitions/ActivitySpecParameterDto" |
| } |
| } |
| } |
| } |
| } |
| } |