Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- description: "MkHost Application for REST API"
- version: "1.0.0"
- title: "API MKhost"
- termsOfService: "http://swagger.io/terms/"
- contact:
- email: "bojan@mkhost.com.mk"
- # license:
- # name: "Apache 2.0"
- # url: "http://www.apache.org/licenses/LICENSE-2.0.html"
- host: "fakturi.mk-host.mk"
- basePath: "/api"
- consumes:
- - application/json
- produces:
- - application/json
- tags:
- - name: "Security"
- description: "MKhost security invoices"
- # externalDocs:
- # description: "Find out more"
- # url: "http://swagger.io"
- # - name: "store"
- # description: "Access to Petstore orders"
- # - name: "user"
- # description: "Operations about user"
- # externalDocs:
- # description: "Find out more about our store"
- # url: "http://swagger.io"
- schemes:
- - "https"
- - "http"
- # paths:
- # 'security_fakturi:
- # post:
- # tags:
- # - "Security"
- # summary: "This part is for generate a token"
- # description: "MKhost security invoices"
- # operationId: "getToken"
- # consumes:
- # - "application/json"
- # produces:
- # - "application/json"
- # parameters:
- # - in: "body"
- # name: "Authorization"
- # description: "Put credentials that are needed for application authentication"
- # required: true
- # schema:
- # $ref: "#/definitions/Token_generate"
- # responses:
- # default:
- # description: "successful operation"
- # # responses:
- # # 200:
- # # description: "Successful authentication"
- # # schema:
- # # $ref: "#/definitions/AuthentichationSuccessResponse"
- # # 405:
- # # description: "Invalid input"
- # # security:
- # # - petstore_auth:
- # # - "write:pets"
- # # - "read:pets"
- # securityDefinitions:
- # Bearer:
- # type: apiKey
- # name: Authorization
- # in: header
- # paths:
- # /:
- # get:
- # security:
- # - Bearer: []
- # responses:
- # '200':
- # description: 'Will send `Authenticated`'
- # '403':
- # description: 'You do not have necessary permissions for the resource'
- paths:
- /security_fakturi:
- post:
- tags:
- - "Security"
- summary: "This part is for generate a token"
- description: "Put credentials that are needed for application authentication"
- # operationId: "getToken"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - name: "Authorization"
- in: "header"
- type: "array"
- description: "Authentication token is required"
- required: true
- schema:
- $ref: "#/definitions/Token_generate"
- responses:
- 200:
- description: "Sucess"
- 401:
- description: "Failed authentication"
- 500:
- description: "Internal server error"
- 405:
- description: "Invalid input"
- 403:
- description: Access token does not have the required scope
- # 200: # Response
- # description: OK
- # content: # Response body
- # application/json: # One of media types
- # schema:
- # type: object
- # properties:
- # id:
- # type: integer
- # name:
- # type: string
- # fullTime:
- # type: boolean
- securityDefinitions:
- # Authorization:
- # type: "apiKey"
- # authorizationUrl: "http://fakturi.mk-host.mk/api/security_fakturi"
- # flow: "implicit"
- # scopes:
- # write:pets: "modify pets in your account"
- # read:pets: "read your pets"
- api_key:
- type: "apiKey"
- name: "Authorization"
- in: "header"
- definitions:
- Token_generate:
- type: "object"
- required:
- - "client_id"
- - "client_secret"
- properties:
- client_id:
- type: "string"
- # format: "string1"
- example: "string"
- client_secret:
- type: "string"
- example: "string"
- # 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: "token"
- AuthentichationSuccessResponse:
- type: "object"
- properties:
- code:
- type: "integer"
- format: "int32"
- message:
- type: "string"
- 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