Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- description: "This is a test API Documentation for the new project."
- version: "1.0.0"
- title: "PTA App"
- contact:
- email: "rajesh.banskota@schittly.com"
- license:
- name: "Apache 2.0"
- url: "http://www.apache.org/licenses/LICENSE-2.0.html"
- host: "datblygu.de"
- basePath: "/pta/v1"
- tags:
- - name: "article"
- description: "Everything about the Articles"
- externalDocs:
- description: "Find out more"
- url: "http://swagger.io"
- - name: "favorite"
- description: "Operations about favorite"
- - name: "comment"
- description: "Operations about user comment"
- - name: "user"
- description: "Operations about user"
- externalDocs:
- description: "Find out more about our store"
- url: "http://swagger.io"
- schemes:
- - "http"
- paths:
- /article/findByType:
- get:
- tags:
- - "article"
- summary: "Finds articles by type"
- description: "type of the articles"
- operationId: "findArticlesByType"
- produces:
- - "application/json"
- parameters:
- - name: "type"
- in: "query"
- description: "Type values that need to be considered for filter"
- required: true
- type: "string"
- responses:
- 200:
- description: "successful operation"
- schema:
- type: "array"
- items:
- $ref: "#/definitions/ArticleLight"
- 400:
- description: "Invalid type value"
- /article/findByTags:
- get:
- tags:
- - "article"
- summary: "Finds Articles by tags"
- description: "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
- operationId: "findArticlesByTags"
- produces:
- - "application/json"
- parameters:
- - name: "tags"
- in: "query"
- description: "Tags to filter by"
- required: true
- type: "array"
- items:
- type: "string"
- collectionFormat: "multi"
- responses:
- 200:
- description: "successful operation"
- schema:
- type: "array"
- items:
- $ref: "#/definitions/Article"
- 400:
- description: "Invalid tags value"
- /article/{articleId}:
- get:
- tags:
- - "article"
- summary: "Find Article by ID"
- description: "Returns a single Article Detail"
- operationId: "getPetById"
- produces:
- - "application/json"
- parameters:
- - name: "articleId"
- in: "path"
- description: "ID of an article to return"
- required: true
- type: "integer"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Article"
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Article not found"
- /favorite:
- get:
- tags:
- - "favorite"
- summary: "Returns all user favorites"
- description: "Returns a list of favorites of an user"
- operationId: "getFavorites"
- produces:
- - "application/json"
- parameters:
- - name: "userid"
- in: "query"
- description: "The user id for which favorites are to be extracted"
- required: true
- type: "integer"
- - name: "articleid"
- in: "query"
- description: "The article id"
- required: false
- type: "integer"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Favorite"
- 404:
- description: "favorites not found"
- security:
- - pta_app_auth: []
- /favorite/create:
- post:
- tags:
- - "favorite"
- summary: "create a new comment"
- description: ""
- operationId: "createFavorite"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "new favorite submitted"
- required: true
- schema:
- $ref: "#/definitions/Savefavorite"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Favorite"
- 400:
- description: "Invalid Article ID"
- security:
- - pta_app_auth: []
- /favorite/delete:
- delete:
- tags:
- - "favorite"
- summary: "Deletes a favorite"
- description: ""
- operationId: "deleteFavorite"
- produces:
- - "application/json"
- parameters:
- - name: "favId"
- in: "query"
- description: "favorite id to delete"
- required: true
- type: "integer"
- responses:
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "favorite not found"
- security:
- - pta_app_auth: []
- /comment:
- get:
- tags:
- - "comment"
- summary: "Returns all user comments"
- description: "Returns a list of comments from users"
- operationId: "getComments"
- produces:
- - "application/json"
- parameters:
- - name: "articleid"
- in: "query"
- description: "The article id for which comments are to be extracted"
- required: true
- type: "integer"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Comment"
- 404:
- description: "comments not found"
- /comment/create:
- post:
- tags:
- - "comment"
- summary: "create a new comment"
- description: ""
- operationId: "createComment"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "new comment submitted"
- required: true
- schema:
- $ref: "#/definitions/Savecomment"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Comment"
- 400:
- description: "Invalid Comment"
- security:
- - pta_app_auth: []
- /user/create:
- post:
- tags:
- - "user"
- summary: "Add a new user to the system"
- description: ""
- operationId: "addUser"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "User object that needs to be added to the system"
- required: true
- schema:
- $ref: "#/definitions/User"
- responses:
- 405:
- description: "Invalid input"
- /user/login:
- get:
- tags:
- - "user"
- summary: "Logs user into the system"
- description: ""
- operationId: "loginUser"
- produces:
- - "application/json"
- parameters:
- - name: "email"
- in: "query"
- description: "The user name in this case is email for login"
- required: true
- type: "string"
- - name: "password"
- in: "query"
- description: "The password for login in clear text"
- required: true
- type: "string"
- responses:
- 200:
- description: "successful operation"
- schema:
- type: "string"
- headers:
- X-Rate-Limit:
- type: "integer"
- format: "int32"
- description: "calls per hour allowed by the user"
- X-Expires-After:
- type: "string"
- format: "date-time"
- description: "date in UTC when token expires"
- 400:
- description: "Invalid username/password supplied"
- /user/logout:
- get:
- tags:
- - "user"
- summary: "Logs out current logged in user session"
- description: ""
- operationId: "logoutUser"
- produces:
- - "application/json"
- parameters: []
- responses:
- default:
- description: "successful operation"
- /user:
- get:
- tags:
- - "user"
- summary: "Get user by user name(email)"
- description: ""
- operationId: "getUserByEmail"
- produces:
- - "application/json"
- parameters:
- - name: "email"
- in: "query"
- description: "The email(username) of the user that needs to be fetched."
- required: true
- type: "string"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/User"
- 400:
- description: "Invalid username supplied"
- 404:
- description: "User not found"
- security:
- - pta_app_auth: []
- /user/update:
- put:
- tags:
- - "user"
- summary: "Updated user"
- description: "This can only be done by the logged in user."
- operationId: "updateUser"
- produces:
- - "application/json"
- parameters:
- - name: "userid"
- in: "query"
- description: "id of the user that need to be updated"
- required: true
- type: "integer"
- - in: "body"
- name: "body"
- description: "Updated user object"
- required: true
- schema:
- $ref: "#/definitions/User"
- responses:
- 400:
- description: "Invalid user Id supplied"
- 404:
- description: "User not found"
- security:
- - pta_app_auth: []
- /user/uploadImage:
- post:
- tags:
- - "user"
- summary: "uploads an profile image"
- description: ""
- operationId: "uploadProfileImage"
- consumes:
- - "multipart/form-data"
- produces:
- - "application/json"
- parameters:
- - name: "userId"
- in: "query"
- description: "ID of user to update"
- required: true
- type: "integer"
- - name: "additionalMetadata"
- in: "formData"
- description: "Additional data to pass to server"
- required: false
- type: "string"
- - name: "file"
- in: "formData"
- description: "file to upload"
- required: false
- type: "file"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/ApiResponse"
- security:
- - pta_app_auth: []
- securityDefinitions:
- pta_app_auth:
- type: "basic"
- definitions:
- Order:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- petId:
- type: "integer"
- format: "int64"
- quantity:
- type: "integer"
- format: "int32"
- shipDate:
- type: "string"
- format: "date-time"
- status:
- type: "string"
- description: "Order Status"
- enum:
- - "placed"
- - "approved"
- - "delivered"
- complete:
- type: "boolean"
- default: false
- xml:
- name: "Order"
- Category:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- xml:
- name: "Category"
- User:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- firstName:
- type: "string"
- lastName:
- type: "string"
- email:
- type: "string"
- password:
- type: "string"
- imageUrl:
- type: "string"
- pushNotificationActivities:
- type: "boolean"
- pushNotificationOffers:
- type: "boolean"
- xml:
- name: "User"
- Favorite:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- articleid:
- type: "integer"
- xml:
- name: "Favorite"
- Savefavorite:
- type: "object"
- properties:
- userid:
- type: "integer"
- articleid:
- type: "integer"
- xml:
- name: "Savefavorite"
- Comment:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- firstName:
- type: "string"
- image:
- type: "string"
- comment:
- type: "string"
- xml:
- name: "Comment"
- Savecomment:
- type: "object"
- properties:
- userid:
- type: "integer"
- format: "int64"
- articleid:
- type: "integer"
- format: "int64"
- comment:
- type: "string"
- xml:
- name: "Savecomment"
- Tag:
- type: "object"
- properties:
- id:
- type: "integer"
- name:
- type: "string"
- xml:
- name: "Tag"
- Certify:
- type: "object"
- properties:
- id:
- type: "integer"
- name:
- type: "string"
- badgeUrl:
- type: "string"
- xml:
- name: "Certify"
- ArticleLight:
- type: "object"
- properties:
- id:
- type: "integer"
- type:
- type: "string"
- category:
- $ref: "#/definitions/Category"
- headline:
- type: "string"
- title:
- type: "string"
- teasertext:
- type: "string"
- teaserImageUrl:
- type: "string"
- contentType:
- type: "string"
- description: "content of the article"
- enum:
- - "video"
- - "audio"
- - "test"
- - "relax"
- tags:
- type: "array"
- xml:
- name: "tag"
- wrapped: true
- items:
- $ref: "#/definitions/Tag"
- successCertification:
- $ref: "#/definitions/Certify"
- xml:
- name: "ArticleLight"
- Article:
- type: "object"
- properties:
- id:
- type: "integer"
- type:
- type: "string"
- category:
- $ref: "#/definitions/Category"
- headline:
- type: "string"
- title:
- type: "string"
- teasertext:
- type: "string"
- teaserImageUrl:
- type: "string"
- contentType:
- type: "string"
- description: "content of the article"
- enum:
- - "video"
- - "audio"
- - "test"
- - "relax"
- tags:
- type: "array"
- xml:
- name: "tag"
- wrapped: true
- items:
- $ref: "#/definitions/Tag"
- bodytext:
- type: "string"
- description: "main content of the article"
- successCertification:
- $ref: "#/definitions/Certify"
- xml:
- name: "Article"
- Pet:
- type: "object"
- required:
- - "name"
- - "photoUrls"
- properties:
- id:
- type: "integer"
- format: "int64"
- category:
- $ref: "#/definitions/Category"
- name:
- type: "string"
- example: "doggie"
- photoUrls:
- type: "array"
- xml:
- name: "photoUrl"
- wrapped: true
- items:
- type: "string"
- tags:
- type: "array"
- xml:
- name: "tag"
- wrapped: true
- items:
- $ref: "#/definitions/Tag"
- status:
- type: "string"
- description: "pet status in the store"
- enum:
- - "available"
- - "pending"
- - "sold"
- xml:
- name: "Pet"
- ApiResponse:
- type: "object"
- properties:
- code:
- type: "integer"
- format: "int32"
- type:
- type: "string"
- message:
- type: "string"
- externalDocs:
- description: "Find out more about Swagger"
- url: "http://swagger.io"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement