From bc25f0b4eafa2275922c1eb5d8a5d261ba5b948a Mon Sep 17 00:00:00 2001 From: MohammadHasan Akbari Date: Fri, 6 Oct 2023 12:48:09 +0330 Subject: [PATCH 1/5] refactor: update response components --- spec/paas.yaml | 495 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 411 insertions(+), 84 deletions(-) diff --git a/spec/paas.yaml b/spec/paas.yaml index e5e4e84..e2d42ff 100644 --- a/spec/paas.yaml +++ b/spec/paas.yaml @@ -232,7 +232,13 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + sourceID: + type: string 400: description: Bad request content: {} @@ -265,7 +271,13 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + releaseID: + type: string 400: description: Bad request content: {} @@ -372,6 +384,9 @@ paths: application/json: schema: type: object + properties: + IP: + type: string 400: description: Bad request content: {} @@ -400,7 +415,13 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + message: + type: string 400: description: Bad request content: {} @@ -451,6 +472,123 @@ paths: description: App does not exists. content: {} x-codegen-request-body-name: plan + '/v1/projects/{name}/disks/{dname}/ftp': + post: + tags: + - Disks + summary: Create ftp + description: create ftp that user owns + operationId: createFtp + parameters: + - name: name + in: path + description: The name of your app + required: true + schema: + type: string + - name: dname + in: path + description: The name of your disk + required: true + schema: + type: string + requestBody: + description: The plan of your app + content: + application/json: + schema: + required: + - username + - readOnly + type: object + properties: + username: + type: string + readOnly: + type: boolean + required: true + responses: + 200: + description: Successful operation + content: + application/json: + schema: + type: object + properties: + username: + type: string + password: + type: string + host: + type: string + 400: + description: Bad request + content: {} + 401: + description: Missing authentication + content: {} + 404: + description: App does not exists. + content: {} + x-codegen-request-body-name: create ftp + get: + tags: + - Disks + summary: Get ftps + description: get ftps that user owns + operationId: getFtps + parameters: + - name: name + in: path + description: The name of your app + required: true + schema: + type: string + - name: dname + in: path + description: The name of your disk + required: true + schema: + type: string + responses: + 200: + description: Successful operation + content: + application/json: + schema: + type: object + properties: + accesses: + type: array + items: + type: object + properties: + _id: + type: string + disk: + type: string + username: + type: string + password: + type: string + readOnly: + type: boolean + createdAt: + type: string + format: date-time + __v: + type: integer + host: + type: string + 400: + description: Bad request + content: {} + 401: + description: Missing authentication + content: {} + 404: + description: App does not exists. + content: {} '/v1/projects/{id}/disks': get: tags: @@ -468,7 +606,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Get-disks' 400: description: Bad request content: {} @@ -501,7 +642,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Get-disk-backup' 400: description: Bad request content: {} @@ -569,6 +713,57 @@ paths: required: true schema: type: string + responses: + 200: + description: Successful operation + content: + application/json: + schema: + type: object + properties: + link: + type: string + 400: + description: Bad request + content: {} + 401: + description: Missing authentication + content: {} + 404: + description: App does not exists. + content: {} + '/v1/projects/{name}/disks/{dname}/resize': + post: + tags: + - Disks + summary: Resize disk + description: resize disk that user owns + operationId: resizeDisk + parameters: + - name: name + in: path + description: The name of your app + required: true + schema: + type: string + - name: dname + in: path + description: The name of your disk + required: true + schema: + type: string + requestBody: + description: The size of your disk + content: + application/json: + schema: + required: + - size + type: object + properties: + size: + type: string + required: true responses: 200: description: Successful operation @@ -582,6 +777,7 @@ paths: 404: description: App does not exists. content: {} + x-codegen-request-body-name: resize disk '/v1/projects/{name}/disks': post: tags: @@ -661,6 +857,36 @@ paths: 409: description: Conflict content: {} + '/v1/ftp/{fname}': + delete: + tags: + - Disks + summary: Delete a ftp + description: delete a ftp that user owns + operationId: deleteFtp + parameters: + - name: fname + in: path + description: The name of your ftp + required: true + schema: + type: string + responses: + 200: + description: Successful operation + content: {} + 400: + description: Bad request + content: {} + 401: + description: Missing authentication + content: {} + 404: + description: App does not exists. + content: {} + 409: + description: Conflict + content: {} '/v1/domains/{id}/check': get: tags: @@ -714,7 +940,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Logs' 400: description: Bad request content: {} @@ -815,7 +1044,42 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + cpuUsage: + type: array + items: + type: object + properties: + value: + type: array + applet: + type: string + memoryUsage: + type: array + items: + type: object + properties: + value: + type: array + applet: + type: string + disksUsage: + type: array + items: + type: object + properties: + size: + type: string + usage: + type: string + reportedAt: + type: string + name: + type: string 400: description: Bad request content: {} @@ -848,7 +1112,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} @@ -881,7 +1148,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} @@ -914,7 +1184,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} @@ -947,7 +1220,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} @@ -1013,9 +1289,18 @@ paths: default: PROJECT required: true responses: - 200: + 201: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + domain: + type: object + properties: + _id: + type: string 400: description: Bad request content: {} @@ -1158,7 +1443,13 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + code: + type: string 400: description: Bad request content: {} @@ -1235,7 +1526,7 @@ components: type: boolean description: The zeroDowntime status of project scale: - type: string + type: number description: The being on of project envs: type: array @@ -1272,7 +1563,7 @@ components: type: number description: The hourlyPrice of project isDeployed: - type: string + type: boolean description: The deployment status of project reservedDiskSpace: type: number @@ -1298,7 +1589,7 @@ components: type: string description: The status of project scale: - type: string + type: number description: The being on of project planID: type: string @@ -1307,8 +1598,19 @@ components: type: string description: The time to create the project isDeployed: - type: string + type: boolean description: The project deployment status + Logs: + type: array + items: + type: object + properties: + type: + type: string + datetime: + type: string + message: + type: string Deploy-releases: type: object properties: @@ -1455,8 +1757,36 @@ components: description: The port of release gitInfo: type: object - properties: {} - description: The gitInfo of release + properties: + branch: + type: string + nullable: true + message: + type: string + nullable: true + commit: + type: string + nullable: true + committedAt: + type: string + format: date-time + nullable: true + remote: + type: string + nullable: true + author: + type: object + properties: + email: + type: string + nullable: true + name: + type: string + nullable: true + tags: + type: array + items: + type: string client: type: string description: The client of release @@ -1472,6 +1802,65 @@ components: sourceAvailable: type: boolean description: The sourceAvailable of release + platform: + type: string + Get-disks: + type: object + properties: + disks: + type: array + items: + properties: + _id: + type: string + name: + type: string + size: + type: integer + updatedAt: + type: string + createdAt: + type: string + mounts: + type: array + items: + properties: + name: + type: string + mountedTo: + type: string + Get-disk-backup: + type: object + properties: + backups: + type: array + items: + type: object + properties: + name: + type: string + lastModified: + type: string + etag: + type: string + size: + type: number + Reports: + type: object + properties: + end: + type: number + result: + type: array + items: + type: object + properties: + values: + type: array + items: + type: array + applet: + type: string CheckDomain: type: object properties: @@ -1489,74 +1878,10 @@ components: project: type: object properties: - current_service: - type: object - properties: - port: - type: integer - name: - type: string - fixedNode: - type: boolean _id: type: string - user: - type: string project_id: type: string - type: - type: string - status: - type: string - readOnlyRootFilesystem: - type: boolean - defaultSubdomain: - type: boolean - zeroDowntime: - type: boolean - isOneClickApp: - type: boolean - isWPPlus: - type: boolean - scale: - type: number - envs: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - encrypted: - type: boolean - _id: - type: string - planID: - type: string - hasVolume: - type: boolean - fixedIPStatus: - type: string - managedBySystem: - type: boolean - updated_at: - type: string - created_at: - type: string - __v: - type: number - node: - type: string - currentRelease: - type: string - lastScaleStartedAt: - type: string - lastScaleFinishedAt: - type: string - resizes: - type: number status: type: string certificatesStatus: @@ -1577,6 +1902,8 @@ components: type: number CNameRecord: type: string + issuedAt: + type: string securitySchemes: jwt: type: apiKey From 15e59f802a0d49bc0e8c93b1103da808887b0b0e Mon Sep 17 00:00:00 2001 From: MohammadHasan Akbari Date: Fri, 6 Oct 2023 14:41:21 +0330 Subject: [PATCH 2/5] refactor: update response components --- spec/dbaas.yaml | 152 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 128 insertions(+), 24 deletions(-) diff --git a/spec/dbaas.yaml b/spec/dbaas.yaml index 27912e0..6069fba 100644 --- a/spec/dbaas.yaml +++ b/spec/dbaas.yaml @@ -38,7 +38,7 @@ paths: 200: description: Successful operation content: - Databaselication/json: + application/json: schema: $ref: '#/components/schemas/DB-details' 400: @@ -86,7 +86,7 @@ paths: 200: description: Successful operation content: - Databaselication/json: + application/json: schema: $ref: '#/components/schemas/DBs-details' 400: @@ -103,14 +103,20 @@ paths: operationId: createDatabase requestBody: content: - Databaselication/json: + application/json: schema: $ref: '#/components/schemas/Create-databases' required: true responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + databaseID: + type: string 400: description: Bad request content: {} @@ -137,7 +143,7 @@ paths: requestBody: description: 1 for power on or 0 for power off content: - Databaselication/json: + application/json: schema: required: - scale @@ -175,7 +181,7 @@ paths: type: string requestBody: content: - Databaselication/json: + application/json: schema: required: - planID @@ -216,7 +222,24 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + backups: + type: array + items: + type: object + properties: + name: + type: string + lastModified: + type: string + etag: + type: string + size: + type: number 400: description: Bad request content: {} @@ -274,7 +297,13 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + link: + type: string 400: description: Bad request content: {} @@ -308,7 +337,13 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + controlPanelID: + type: string 400: description: Bad request content: {} @@ -381,7 +416,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} @@ -414,7 +452,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} @@ -447,7 +488,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} @@ -480,7 +524,10 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Reports' 400: description: Bad request content: {} @@ -507,7 +554,40 @@ paths: responses: 200: description: Successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + cpuUsage: + type: array + items: + type: object + properties: + value: + type: array + applet: + type: string + memoryUsage: + type: array + items: + type: object + properties: + value: + type: array + applet: + type: string + disksUsage: + type: array + items: + type: object + properties: + size: + type: string + usage: + type: string + reportedAt: + type: string 400: description: Bad request content: {} @@ -525,6 +605,11 @@ components: hostname: type: string description: The hostname of databases that you want to create + options: + type: object + properties: + standaloneReplicaSet: + type: boolean publicNetwork: type: boolean description: The publicNetwork of databases that you want to create @@ -570,19 +655,12 @@ components: volumeSize: type: integer description: The size of the database volume - metaData: - type: object - properties: - standaloneReplicaSet: - type: boolean - description: Indicates if the database uses a standalone replica - set - privateNetwork: - type: boolean - description: Indicates if the database is on a private network created_at: type: string description: The creation timestamp of the database + dbName: + type: string + description: The name of db node: type: object properties: @@ -607,9 +685,35 @@ components: hourlyPrice: type: number description: The hourly price of the database + metaData: + type: object + properties: + standaloneReplicaSet: + type: boolean + description: Indicates if the database uses a standalone replica + set + privateNetwork: + type: boolean + description: Indicates if the database is on a private network username: type: string description: The username associated with the database + Reports: + type: object + properties: + end: + type: number + result: + type: array + items: + type: object + properties: + values: + type: array + items: + type: array + applet: + type: string DBs-details: type: object properties: From 7e9f40330ecc75f4fa3ef7eb699daed750f6bc85 Mon Sep 17 00:00:00 2001 From: MohammadHasan Akbari Date: Fri, 6 Oct 2023 15:29:08 +0330 Subject: [PATCH 3/5] refactor: update response components --- spec/dns.yaml | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/spec/dns.yaml b/spec/dns.yaml index f072630..e2c9f49 100644 --- a/spec/dns.yaml +++ b/spec/dns.yaml @@ -59,7 +59,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Zone' + $ref: '#/components/schemas/Create-zone' 400: description: Bad Request content: {} @@ -83,7 +83,7 @@ paths: parameters: - name: zone in: path - description: The name of the zone to delete + description: The name of the zone required: true schema: type: string @@ -93,7 +93,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Zone' + $ref: '#/components/schemas/Create-zone' 401: description: Missing authentication content: {} @@ -116,7 +116,10 @@ paths: responses: 200: description: Your request has been submitted. - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Submitted' 204: description: Zone deleted. content: {} @@ -349,6 +352,8 @@ components: Zone: type: object properties: + id: + type: string name: type: string description: 'The name of the zone, “liara.ir”, max length: 253, pattern: @@ -357,11 +362,11 @@ components: type: string description: 'The status of the zone, valid values: [CREATING, PENDING, ACTIVE, DELETING]' - nameServers: + currentNameServers: type: array items: type: string - currentNameServers: + nameServers: type: array items: type: string @@ -371,10 +376,22 @@ components: createdAt: type: string description: Time when zone was created + Create-zone: + type: object + properties: + status: + type: string + data: + $ref: '#/components/schemas/Zone' Zones: - type: array - items: - $ref: '#/components/schemas/Zone' + type: object + properties: + status: + type: string + data: + type: array + items: + $ref: '#/components/schemas/Zone' Dns-record: type: object properties: From e17c4078931dc7ef743cf93ca3cc1d3dc99d4e4e Mon Sep 17 00:00:00 2001 From: MohammadHasan Akbari Date: Fri, 6 Oct 2023 18:06:11 +0330 Subject: [PATCH 4/5] refactor: update response components --- spec/object-storage.yaml | 356 +++++++++++++++++++++++++++++++++++---- 1 file changed, 326 insertions(+), 30 deletions(-) diff --git a/spec/object-storage.yaml b/spec/object-storage.yaml index 5b73129..2849be5 100644 --- a/spec/object-storage.yaml +++ b/spec/object-storage.yaml @@ -35,7 +35,10 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/List-Bucket' 401: description: Missing authentication content: {} @@ -52,14 +55,20 @@ paths: description: 'create bucket. Acceptable values for permission: ( private / public ) and for plan: ( 20g, 40g, 80g, 160g )' content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Create-Bucket' required: true responses: 201: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -83,7 +92,15 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + migrations: + type: array 400: description: Bad Request content: {} @@ -118,7 +135,15 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + permission: + type: string 400: description: Bad Request content: {} @@ -152,7 +177,15 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + quota: + type: string 400: description: Bad Request content: {} @@ -186,7 +219,16 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + bucket: + $ref: '#/components/schemas/Bucket' + 401: description: Missing authentication content: {} @@ -237,7 +279,13 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -263,7 +311,7 @@ paths: requestBody: description: Migrate buckets content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Migrate-Bucket' required: true @@ -316,7 +364,10 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Keys' 400: description: Bad Request content: {} @@ -345,7 +396,20 @@ paths: responses: 201: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + data: + type: object + properties: + accessKey: + type: string + secretKey: + type: string 400: description: Bad Request content: {} @@ -434,14 +498,20 @@ paths: requestBody: description: Declare Buckets for access key content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Create-Key' required: true responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -474,7 +544,17 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + accessKey: + type: string + secretKey: + type: string 400: description: Bad Request content: {} @@ -517,7 +597,18 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + data: + type: object + properties: + url: + type: string 400: description: Bad Request content: {} @@ -555,7 +646,18 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + data: + type: object + properties: + url: + type: string 400: description: Bad Request content: {} @@ -601,7 +703,10 @@ paths: responses: 200: description: successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Objects' 400: description: Bad Request content: {} @@ -671,9 +776,12 @@ paths: schema: type: string responses: - 204: + 200: description: successful operation - content: {} + content: + application/json: + schema: + $ref: '#/components/schemas/Stat' 400: description: Bad Request content: {} @@ -704,14 +812,25 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Create-Folder' required: true responses: 201: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + data: + type: object + properties: + folder: + type: string 400: description: Bad Request content: {} @@ -740,11 +859,14 @@ paths: required: true schema: type: string - - name: path - in: query - required: true - schema: - type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + path: + type: string responses: 204: description: successful operation @@ -777,9 +899,27 @@ paths: schema: type: string responses: - 204: + 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + data: + type: object + properties: + bucket: + type: string + metrics: + type: object + properties: + totol_objects: + type: array + total_bytes: + type: array 400: description: Bad Request content: {} @@ -814,9 +954,25 @@ paths: schema: type: string responses: - 204: + 200: description: successful operation - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string + data: + type: object + properties: + bucket: + type: string + metrics: + type: object + properties: + totol_objects: + type: array 400: description: Bad Request content: {} @@ -834,6 +990,146 @@ paths: content: {} components: schemas: + Stat: + type: object + properties: + status: + type: string + data: + type: object + properties: + object: + type: object + properties: + size: + type: number + metaData: + type: object + properties: + content-type: + type: string + lastModified: + type: string + versionId: + type: string + etag: + type: string + Objects: + type: object + properties: + status: + type: string + data: + type: object + properties: + objects: + type: object + properties: + IsTruncated: + type: boolean + Contents: + type: array + items: + type: object + properties: + Key: + type: string + LastModified: + type: string + ETag: + type: string + ChecksumAlgorithm: + type: array + Size: + type: number + StorageClass: + type: string + Name: + type: string + Prefix: + type: string + Delimiter: + type: string + MaxKeys: + type: number + CommonPrefixes: + type: array + items: + type: object + properties: + Prefix: + type: string + KeyCount: + type: number + Key: + type: object + properties: + id: + type: string + buckets: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + plan: + type: string + status: + type: string + permission: + type: string + createdAt: + type: string + updatedAt: + type: string + status: + type: string + accessKey: + type: string + description: + type: string + createdAt: + type: string + updatedAt: + type: string + Keys: + type: object + properties: + status: + type: string + keys: + type: array + items: + $ref: '#/components/schemas/Key' + Bucket: + type: object + properties: + id: + type: string + name: + type: string + plan: + type: string + status: + type: string + permission: + type: string + createdAt: + type: string + updatedAt: + type: string + List-Bucket: + type: object + properties: + status: + type: string + buckets: + type: array + items: + $ref: '#/components/schemas/Bucket' Migrate-Bucket: type: object properties: From 924f871a7aae2325636661c2ab2c6b0743cabec3 Mon Sep 17 00:00:00 2001 From: MohammadHasan Akbari Date: Fri, 6 Oct 2023 21:48:55 +0330 Subject: [PATCH 5/5] refactor: update response components --- spec/mail.yaml | 396 +++++++++++++++++++++++++++++++-------- spec/object-storage.yaml | 2 +- 2 files changed, 320 insertions(+), 78 deletions(-) diff --git a/spec/mail.yaml b/spec/mail.yaml index 308df90..19d84cc 100644 --- a/spec/mail.yaml +++ b/spec/mail.yaml @@ -40,7 +40,7 @@ paths: 200: description: Ok content: - '*/*': + application/json: schema: $ref: '#/components/schemas/MailServers' 500: @@ -53,14 +53,20 @@ paths: operationId: postMails requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Model1' required: false responses: 201: description: OK - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Invalid request for plan content: {} @@ -91,7 +97,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/MailServer' 400: @@ -142,14 +148,20 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Model8' required: false responses: 200: description: OK - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -177,7 +189,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/SMTP' 400: @@ -203,7 +215,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Model4' required: false @@ -211,7 +223,7 @@ paths: 201: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/CreateSMTP' 400: @@ -241,7 +253,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Model9' required: false @@ -249,7 +261,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/CreateSMTP' 400: @@ -280,13 +292,13 @@ paths: schema: maximum: 180 minimum: 1 - type: integer + type: number default: 30 responses: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/CountMailPerDay' 400: @@ -315,7 +327,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/CheckDNS' 404: @@ -339,7 +351,13 @@ paths: responses: 200: description: OK - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -363,7 +381,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/RemainingFreeMails' 400: @@ -392,7 +410,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/MailAccounts' 400: @@ -418,14 +436,20 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Model5' required: false responses: 201: description: OK - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -452,7 +476,7 @@ paths: - name: page in: query schema: - type: integer + type: number default: 1 x-constraint: sign: positive @@ -462,7 +486,7 @@ paths: in: query schema: maximum: 100 - type: integer + type: number default: 15 x-constraint: sign: positive @@ -496,7 +520,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/MailMessages' 400: @@ -522,14 +546,20 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Model3' required: false responses: 201: description: OK - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -572,9 +602,17 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/MailMessage' + type: object + properties: + status: + type: string + data: + type: object + properties: + message: + $ref: '#/components/schemas/MailMessage' 400: description: Bad Request content: {} @@ -607,7 +645,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/MailForwards' 400: @@ -639,14 +677,20 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Model6' required: false responses: 201: description: OK - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -686,7 +730,13 @@ paths: responses: 200: description: OK - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -772,7 +822,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/MailAttachments' 400: @@ -809,7 +859,7 @@ paths: - name: page in: query schema: - type: integer + type: number default: 1 x-constraint: sign: positive @@ -819,7 +869,7 @@ paths: in: query schema: maximum: 100 - type: integer + type: number default: 15 x-constraint: sign: positive @@ -829,7 +879,7 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/MailEvents' 400: @@ -870,9 +920,17 @@ paths: 200: description: OK content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/MailAttachment' + type: object + properties: + status: + type: string + data: + type: object + properties: + attachment: + $ref: '#/components/schemas/MailAttachment' 400: description: Bad Request content: {} @@ -907,13 +965,13 @@ paths: schema: maximum: 168 minimum: 1 - type: integer + type: number default: 1 responses: 201: description: OK content: - '*/*': + application/json: schema: $ref: '#/components/schemas/TmpAccess' 400: @@ -1044,14 +1102,20 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Model10' required: false responses: 200: description: OK - content: {} + content: + application/json: + schema: + type: object + properties: + status: + type: string 400: description: Bad Request content: {} @@ -1073,8 +1137,7 @@ components: type: object properties: token: - type: object - properties: {} + type: string MailEvents: type: object properties: @@ -1086,8 +1149,7 @@ components: total: type: number events: - type: object - properties: {} + type: array MailAttachments: type: object properties: @@ -1111,6 +1173,8 @@ components: type: string createdAt: type: string + id: + type: string data: type: string MailForwards: @@ -1122,8 +1186,18 @@ components: type: object properties: forwarders: - type: object - properties: {} + type: array + items: + type: object + properties: + account: + type: string + address: + type: string + createdAt: + type: string + id: + type: string MailMessages: type: object properties: @@ -1135,7 +1209,9 @@ components: total: type: number messages: - $ref: '#/components/schemas/MailMessage' + type: array + items: + $ref: '#/components/schemas/MailMessage' MailMessage: type: object properties: @@ -1161,7 +1237,15 @@ components: type: string status: type: object - properties: {} + properties: + event: + type: string + state: + type: string + details: + type: string + id: + type: string spamReson: type: object properties: {} @@ -1176,8 +1260,16 @@ components: domain: type: string accounts: - type: object - properties: {} + type: array + items: + type: object + properties: + name: + type: string + createdAt: + type: string + id: + type: string RemainingFreeMails: type: object properties: @@ -1188,20 +1280,101 @@ components: properties: count: type: number + CheckDNSResponse: + type: object + properties: + dns_setup: + type: object + properties: + dkim: + type: object + properties: + dkim_error: + type: string + dkim_record: + type: string + dkim_record_name: + type: string + dkim_status: + type: string + mx_record: + type: object + properties: + mx_error: + type: string + mx_status: + type: string + mx_record_value: + type: string + return_path: + type: object + properties: + return_path_domain: + type: string + return_path_error: + type: string + return_path_status: + type: string + return_path_value: + type: string + spf: + type: object + properties: + spf_error: + type: string + spf_record: + type: string + spf_status: + type: string + user: + type: string + domain: + type: string + recordsStatus: + type: string + mode: + type: string + status: + type: string + checkDNSRecord: + type: boolean + createdAt: + type: string + updatedAt: + type: string + id: + type: string + smtp_server: + type: string + smtp_port: + type: number CheckDNS: type: object properties: status: type: string - date: - $ref: '#/components/schemas/MailServer' + data: + type: object + properties: + mailServer: + $ref: '#/components/schemas/CheckDNSResponse' CountMailPerDay: type: object properties: status: type: string - date: - type: number + data: + type: object + properties: + emailPerDay: + type: array + items: + type: object + properties: + count: + type: number + date: + type: number CreateSMTP: type: object properties: @@ -1222,41 +1395,110 @@ components: data: type: object properties: - description: - type: string - createdAt: - type: string - username: - type: string - MailServer: + credentials: + type: array + items: + type: object + properties: + description: + type: string + createdAt: + type: string + username: + type: string + MailServerResponse: type: object properties: - id: - type: string - mode: + dns_setup: + type: object + properties: + dkim: + type: object + properties: + dkim_error: + type: string + dkim_record: + type: string + dkim_record_name: + type: string + dkim_status: + type: string + mx_record: + type: object + properties: + mx_error: + type: string + mx_status: + type: string + mx_record_value: + type: string + return_path: + type: object + properties: + return_path_domain: + type: string + return_path_error: + type: string + return_path_status: + type: string + return_path_value: + type: string + spf: + type: object + properties: + spf_error: + type: string + spf_record: + type: string + spf_status: + type: string + domain: type: string recordsStatus: type: string - smtp_port: - type: string - smtp_server: + status: type: string - plan: + rateLimitTier: type: object - properties: {} - domain: - type: string + properties: + hourly: + type: number + daily: + type: number + monthly: + type: number createdAt: type: string - dns_setup: + id: type: string - rateLimitTier: + smtp_server: + type: string + smtp_port: + type: number + rootPartOfDomain: + type: string + MailServer: + type: object + properties: + status: + type: string + data: type: object - properties: {} + properties: + mailServer: + $ref: '#/components/schemas/MailServerResponse' MailServers: - type: array - items: - $ref: '#/components/schemas/MailServer' + type: object + properties: + status: + type: string + data: + type: object + properties: + mailServers: + type: array + items: + $ref: '#/components/schemas/MailServerResponse' mode: type: string enum: diff --git a/spec/object-storage.yaml b/spec/object-storage.yaml index 2849be5..3adcc19 100644 --- a/spec/object-storage.yaml +++ b/spec/object-storage.yaml @@ -389,7 +389,7 @@ paths: requestBody: description: Declare Buckets for access key content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Create-Key' required: true