Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openapi: 3.0.3
- info:
- title: idanpow API
- version: 0.0.1
- description: API with only one handle to calculate the power of matrix
- paths:
- /matrix/multiplication/scalar:
- get:
- operationId: matrix_multiplication_scalar_retrieve
- summary: Get matrix scalar multiplication operation details
- parameters:
- - in: query
- name: id
- schema:
- type: string
- format: uuid
- required: true
- tags:
- - matrix
- responses:
- '200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Operation'
- examples:
- ValidExample1:
- value:
- id: c3799cf2-6cf9-4925-916f-0736562e9930
- done: true
- result:
- matrix:
- - - 1
- - 2
- - - 3
- - 4
- summary: Operation Success
- description: Operation successfully returned matrix
- ValidExample2:
- value:
- id: c3799cf2-6cf9-4925-916f-0736562e9930
- done: false
- result: null
- summary: Operation pending
- description: Operation is pending for execution
- description: ''
- '404':
- description: No response body
- '422':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ValidationError'
- description: ''
- '500':
- description: No response body
- post:
- operationId: matrix_multiplication_scalar_create
- summary: Post matrix and scalar to execute scalar multiplication operation
- tags:
- - matrix
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/MultiplyMatrix'
- application/x-www-form-urlencoded:
- schema:
- $ref: '#/components/schemas/MultiplyMatrix'
- multipart/form-data:
- schema:
- $ref: '#/components/schemas/MultiplyMatrix'
- required: true
- responses:
- '200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Operation'
- examples:
- ValidExample1:
- value:
- id: c3799cf2-6cf9-4925-916f-0736562e9930
- done: true
- result:
- matrix:
- - - 1
- - 2
- - - 3
- - 4
- summary: Operation Success
- description: Operation successfully returned matrix
- ValidExample2:
- value:
- id: c3799cf2-6cf9-4925-916f-0736562e9930
- done: false
- result: null
- summary: Operation pending
- description: Operation is pending for execution
- description: ''
- '422':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ValidationError'
- description: ''
- '500':
- description: No response body
- /matrix/power:
- get:
- operationId: matrix_power_retrieve
- summary: Get matrix power operation details
- parameters:
- - in: query
- name: id
- schema:
- type: string
- format: uuid
- required: true
- tags:
- - matrix
- responses:
- '200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Operation'
- examples:
- ValidExample1:
- value:
- id: c3799cf2-6cf9-4925-916f-0736562e9930
- done: true
- result:
- matrix:
- - - 1
- - 2
- - - 3
- - 4
- summary: Operation Success
- description: Operation successfully returned matrix
- ValidExample2:
- value:
- id: c3799cf2-6cf9-4925-916f-0736562e9930
- done: false
- result: null
- summary: Operation pending
- description: Operation is pending for execution
- description: ''
- '404':
- description: No response body
- '422':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ValidationError'
- description: ''
- '500':
- description: No response body
- post:
- operationId: matrix_power_create
- summary: Post matrix and exponent to execute power operation
- tags:
- - matrix
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PowerSquareMatrix'
- application/x-www-form-urlencoded:
- schema:
- $ref: '#/components/schemas/PowerSquareMatrix'
- multipart/form-data:
- schema:
- $ref: '#/components/schemas/PowerSquareMatrix'
- required: true
- responses:
- '200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Operation'
- examples:
- ValidExample1:
- value:
- id: c3799cf2-6cf9-4925-916f-0736562e9930
- done: true
- result:
- matrix:
- - - 1
- - 2
- - - 3
- - 4
- summary: Operation Success
- description: Operation successfully returned matrix
- ValidExample2:
- value:
- id: c3799cf2-6cf9-4925-916f-0736562e9930
- done: false
- result: null
- summary: Operation pending
- description: Operation is pending for execution
- description: ''
- '422':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ValidationError'
- description: ''
- '500':
- description: No response body
- components:
- schemas:
- MultiplyMatrix:
- type: object
- properties:
- matrix:
- type: array
- items:
- type: array
- items:
- type: number
- format: double
- minItems: 2
- minItems: 2
- scalar:
- type: number
- format: double
- required:
- - matrix
- - scalar
- Operation:
- type: object
- properties:
- id:
- type: string
- format: uuid
- done:
- type: boolean
- result:
- type: object
- additionalProperties: {}
- required:
- - done
- - id
- - result
- PowerSquareMatrix:
- type: object
- properties:
- matrix:
- type: array
- items:
- type: array
- items:
- type: number
- format: double
- minItems: 2
- minItems: 2
- exponent:
- type: integer
- minimum: 2
- required:
- - exponent
- - matrix
- ValidationError:
- type: object
- properties:
- errors:
- type: object
- additionalProperties:
- type: array
- items:
- type: string
- required:
- - errors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement