From 78f75a06df492e5eb3b04135468a5f1098e296c1 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 1 Jul 2023 16:56:07 +0200 Subject: [PATCH] Updated swagger docs to v3.1, and fixed some 'required' definitions --- composer.json | 2 +- docs/swagger/definitions/DeviceLongUrls.json | 9 +++------ docs/swagger/definitions/DeviceLongUrlsEdit.json | 6 +++--- docs/swagger/swagger.json | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index ba72eed1..3a970ee5 100644 --- a/composer.json +++ b/composer.json @@ -63,7 +63,7 @@ "symfony/string": "^6.2" }, "require-dev": { - "cebe/php-openapi": "^1.7", + "devizzent/cebe-php-openapi": "dev-I-5_server_definition_fix as 1.1", "devster/ubench": "^2.1", "infection/infection": "^0.27", "openswoole/ide-helper": "~22.0.0", diff --git a/docs/swagger/definitions/DeviceLongUrls.json b/docs/swagger/definitions/DeviceLongUrls.json index 1a56d9ef..0e8719db 100644 --- a/docs/swagger/definitions/DeviceLongUrls.json +++ b/docs/swagger/definitions/DeviceLongUrls.json @@ -3,18 +3,15 @@ "properties": { "android": { "description": "The long URL to redirect to when the short URL is visited from a device running Android", - "type": "string", - "nullable": false + "type": ["string"] }, "ios": { "description": "The long URL to redirect to when the short URL is visited from a device running iOS", - "type": "string", - "nullable": false + "type": ["string"] }, "desktop": { "description": "The long URL to redirect to when the short URL is visited from a desktop browser", - "type": "string", - "nullable": false + "type": ["string"] } } } diff --git a/docs/swagger/definitions/DeviceLongUrlsEdit.json b/docs/swagger/definitions/DeviceLongUrlsEdit.json index 78f77e46..f1ff255f 100644 --- a/docs/swagger/definitions/DeviceLongUrlsEdit.json +++ b/docs/swagger/definitions/DeviceLongUrlsEdit.json @@ -5,13 +5,13 @@ }], "properties": { "android": { - "nullable": true + "type": ["null"] }, "ios": { - "nullable": true + "type": ["null"] }, "desktop": { - "nullable": true + "type": ["null"] } } } diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index b80ae3b2..51655ecf 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "Shlink", "description": "Shlink, the self-hosted URL shortener",