diff --git a/config/api/V1/translation.yaml b/config/api/V1/translation.yaml index f38bc6e1f..3a158311b 100644 --- a/config/api/V1/translation.yaml +++ b/config/api/V1/translation.yaml @@ -2,10 +2,12 @@ post: tags: [Translation] summary: Get all translations + security: + - access_token: [] requestBody: description: Locale and array of keys content: - application/hal+json: + application/json: schema: ref: '#/components/schemas/Translation' responses: @@ -14,16 +16,7 @@ content: application/json: schema: - type: object - properties: - locale: - type: string - example: en - keys: - type: array - items: - type: string - example: 'key1' + ref: '#/components/schemas/Translation' '403': description: Unauthorized content: diff --git a/config/pimcore/packages/nelmio_api_doc.yaml b/config/pimcore/packages/nelmio_api_doc.yaml index f4472d1de..24f46b4d7 100644 --- a/config/pimcore/packages/nelmio_api_doc.yaml +++ b/config/pimcore/packages/nelmio_api_doc.yaml @@ -14,6 +14,10 @@ nelmio_api_doc: version: 1.0.0 components: + securitySchemes: + access_token: + type: http + scheme: bearer schemas: Translation: type: object diff --git a/src/Dto/Translation.php b/src/Dto/Translation.php index a3afa84e5..83c303d40 100644 --- a/src/Dto/Translation.php +++ b/src/Dto/Translation.php @@ -23,7 +23,7 @@ { public function __construct( private string $locale = 'en', - private array $keys = [] + private array $keys = [PublicTranslations::PUBLIC_KEYS] ) { }