From cfd0c530297ae002410698b628b1e16dc806075a Mon Sep 17 00:00:00 2001 From: Ambroise Maupate Date: Wed, 27 Mar 2024 15:25:38 +0100 Subject: [PATCH] fix: Need to comment all bundle config api_resource definitions --- .../config/api_resources/attribute.yml | 8 +- .../config/api_resources/attribute_value.yml | 28 +-- .../config/api_resources/common_content.yml | 58 ++--- .../config/api_resources/custom_form.yml | 220 +++++++++--------- .../config/api_resources/document.yml | 30 +-- .../config/api_resources/folder.yml | 26 +-- .../config/api_resources/node.yml | 16 +- .../config/api_resources/nodes_sources.yml | 132 +++++------ .../config/api_resources/realm.yml | 28 +-- .../config/api_resources/tag.yml | 36 +-- .../config/api_resources/translation.yml | 34 +-- .../config/api_resources/web_response.yml | 6 +- 12 files changed, 311 insertions(+), 311 deletions(-) diff --git a/lib/RoadizCoreBundle/config/api_resources/attribute.yml b/lib/RoadizCoreBundle/config/api_resources/attribute.yml index ed131e5f..07ccee13 100644 --- a/lib/RoadizCoreBundle/config/api_resources/attribute.yml +++ b/lib/RoadizCoreBundle/config/api_resources/attribute.yml @@ -1,4 +1,4 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\Attribute: - operations: [] - +#resources: +# RZ\Roadiz\CoreBundle\Entity\Attribute: +# operations: [] +# diff --git a/lib/RoadizCoreBundle/config/api_resources/attribute_value.yml b/lib/RoadizCoreBundle/config/api_resources/attribute_value.yml index cd24bf63..50fd10fe 100644 --- a/lib/RoadizCoreBundle/config/api_resources/attribute_value.yml +++ b/lib/RoadizCoreBundle/config/api_resources/attribute_value.yml @@ -1,14 +1,14 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\AttributeValue: - operations: - ApiPlatform\Metadata\GetCollection: - method: "GET" - normalizationContext: - groups: ["urls", "attribute", "document_display", "attribute_node", "attribute_documents"] - enable_max_depth: true - ApiPlatform\Metadata\Get: - method: 'GET' - normalizationContext: - groups: ["urls", "attribute", "document_display", "attribute_node", "attribute_documents"] - enable_max_depth: true - +#resources: +# RZ\Roadiz\CoreBundle\Entity\AttributeValue: +# operations: +# ApiPlatform\Metadata\GetCollection: +# method: "GET" +# normalizationContext: +# groups: ["urls", "attribute", "document_display", "attribute_node", "attribute_documents"] +# enable_max_depth: true +# ApiPlatform\Metadata\Get: +# method: 'GET' +# normalizationContext: +# groups: ["urls", "attribute", "document_display", "attribute_node", "attribute_documents"] +# enable_max_depth: true +# diff --git a/lib/RoadizCoreBundle/config/api_resources/common_content.yml b/lib/RoadizCoreBundle/config/api_resources/common_content.yml index f6e7d26c..a02a765a 100644 --- a/lib/RoadizCoreBundle/config/api_resources/common_content.yml +++ b/lib/RoadizCoreBundle/config/api_resources/common_content.yml @@ -1,29 +1,29 @@ -resources: - App\Api\Model\CommonContent: - operations: - getCommonContent: - class: ApiPlatform\Metadata\Get - method: 'GET' - uriTemplate: '/common_content' - read: false - controller: App\Controller\GetCommonContentController - pagination_enabled: false - normalizationContext: - enable_max_depth: true - pagination_enabled: false - groups: - - get - - common_content - - web_response - - walker - - walker_level - - children - - children_count - - nodes_sources_base - - nodes_sources_default - - urls - - blocks_urls - - tag_base - - translation_base - - document_display - - document_folders +#resources: +# App\Api\Model\CommonContent: +# operations: +# getCommonContent: +# class: ApiPlatform\Metadata\Get +# method: 'GET' +# uriTemplate: '/common_content' +# read: false +# controller: App\Controller\GetCommonContentController +# pagination_enabled: false +# normalizationContext: +# enable_max_depth: true +# pagination_enabled: false +# groups: +# - get +# - common_content +# - web_response +# - walker +# - walker_level +# - children +# - children_count +# - nodes_sources_base +# - nodes_sources_default +# - urls +# - blocks_urls +# - tag_base +# - translation_base +# - document_display +# - document_folders diff --git a/lib/RoadizCoreBundle/config/api_resources/custom_form.yml b/lib/RoadizCoreBundle/config/api_resources/custom_form.yml index 27e15d8b..0a4f26de 100644 --- a/lib/RoadizCoreBundle/config/api_resources/custom_form.yml +++ b/lib/RoadizCoreBundle/config/api_resources/custom_form.yml @@ -1,110 +1,110 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\CustomForm: - operations: - ApiPlatform\Metadata\GetCollection: - method: "GET" - normalizationContext: - enable_max_depth: true - - ApiPlatform\Metadata\Get: - method: 'GET' - normalizationContext: - enable_max_depth: true - - api_custom_forms_item_post: - method: 'POST' - class: ApiPlatform\Metadata\Post - routeName: api_custom_forms_item_post - normalizationContext: - enable_max_depth: true - openapiContext: - summary: Post a user custom form - description: | - Post a user custom form - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - custom_form_slug[email]: - type: string - example: test@test.test - custom_form_slug[first_name]: - type: string - example: John - custom_form_slug[last_name]: - type: string - example: Doe - responses: - 201: ~ - 400: - description: Posted custom form has errors - content: - application/json: - schema: - type: object - properties: - email: - type: object - example: - email: This value is not a valid email address. - 202: - description: Posted custom form was accepted - content: - application/json: - schema: - type: object - properties: { } - - api_custom_forms_item_definition: - method: 'GET' - class: ApiPlatform\Metadata\Get - routeName: api_custom_forms_item_definition - normalizationContext: - enable_max_depth: true - openapiContext: - summary: Get a custom form definition for frontend - description: | - Get a custom form definition for frontend - responses: - 200: - description: Custom form definition object - content: - application/json: - schema: - type: object - properties: - title: - type: string - description: Form inputs prefix - example: reiciendis_natus_ducimus_nostrum - type: - type: string - description: Form definition type - example: object - properties: - type: object - description: Form definition fields - example: - email: - type: string - title: Email - attr: - data-group: null - placeholder: null - widget: email - propertyOrder: 1 - first_name: - type: string - title: Firstname - attr: - data-group: null - placeholder: null - widget: string - propertyOrder: 2 - required: - type: array - description: Required fields names - example: - - 'email' +#resources: +# RZ\Roadiz\CoreBundle\Entity\CustomForm: +# operations: +# ApiPlatform\Metadata\GetCollection: +# method: "GET" +# normalizationContext: +# enable_max_depth: true +# +# ApiPlatform\Metadata\Get: +# method: 'GET' +# normalizationContext: +# enable_max_depth: true +# +# api_custom_forms_item_post: +# method: 'POST' +# class: ApiPlatform\Metadata\Post +# routeName: api_custom_forms_item_post +# normalizationContext: +# enable_max_depth: true +# openapiContext: +# summary: Post a user custom form +# description: | +# Post a user custom form +# requestBody: +# content: +# multipart/form-data: +# schema: +# type: object +# properties: +# custom_form_slug[email]: +# type: string +# example: test@test.test +# custom_form_slug[first_name]: +# type: string +# example: John +# custom_form_slug[last_name]: +# type: string +# example: Doe +# responses: +# 201: ~ +# 400: +# description: Posted custom form has errors +# content: +# application/json: +# schema: +# type: object +# properties: +# email: +# type: object +# example: +# email: This value is not a valid email address. +# 202: +# description: Posted custom form was accepted +# content: +# application/json: +# schema: +# type: object +# properties: { } +# +# api_custom_forms_item_definition: +# method: 'GET' +# class: ApiPlatform\Metadata\Get +# routeName: api_custom_forms_item_definition +# normalizationContext: +# enable_max_depth: true +# openapiContext: +# summary: Get a custom form definition for frontend +# description: | +# Get a custom form definition for frontend +# responses: +# 200: +# description: Custom form definition object +# content: +# application/json: +# schema: +# type: object +# properties: +# title: +# type: string +# description: Form inputs prefix +# example: reiciendis_natus_ducimus_nostrum +# type: +# type: string +# description: Form definition type +# example: object +# properties: +# type: object +# description: Form definition fields +# example: +# email: +# type: string +# title: Email +# attr: +# data-group: null +# placeholder: null +# widget: email +# propertyOrder: 1 +# first_name: +# type: string +# title: Firstname +# attr: +# data-group: null +# placeholder: null +# widget: string +# propertyOrder: 2 +# required: +# type: array +# description: Required fields names +# example: +# - 'email' diff --git a/lib/RoadizCoreBundle/config/api_resources/document.yml b/lib/RoadizCoreBundle/config/api_resources/document.yml index 9093e2f9..db91f92b 100644 --- a/lib/RoadizCoreBundle/config/api_resources/document.yml +++ b/lib/RoadizCoreBundle/config/api_resources/document.yml @@ -1,15 +1,15 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\Document: - operations: - ApiPlatform\Metadata\GetCollection: - method: "GET" - normalizationContext: - groups: ["urls", "document_display", "document_folders", "document_folders_all", "document_display_sources"] - enable_max_depth: true - - ApiPlatform\Metadata\Get: - method: 'GET' - normalizationContext: - groups: ["urls", "document", "document_display", "document_folders", "document_folders_all", "document_display_sources"] - enable_max_depth: true - +#resources: +# RZ\Roadiz\CoreBundle\Entity\Document: +# operations: +# ApiPlatform\Metadata\GetCollection: +# method: "GET" +# normalizationContext: +# groups: ["urls", "document_display", "document_folders", "document_folders_all", "document_display_sources"] +# enable_max_depth: true +# +# ApiPlatform\Metadata\Get: +# method: 'GET' +# normalizationContext: +# groups: ["urls", "document", "document_display", "document_folders", "document_folders_all", "document_display_sources"] +# enable_max_depth: true +# diff --git a/lib/RoadizCoreBundle/config/api_resources/folder.yml b/lib/RoadizCoreBundle/config/api_resources/folder.yml index 61edc334..01016890 100644 --- a/lib/RoadizCoreBundle/config/api_resources/folder.yml +++ b/lib/RoadizCoreBundle/config/api_resources/folder.yml @@ -1,13 +1,13 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\Folder: - operations: - ApiPlatform\Metadata\GetCollection: - method: "GET" - normalizationContext: - groups: [ "folder" ] - enable_max_depth: true - ApiPlatform\Metadata\Get: - method: "GET" - normalizationContext: - groups: [ "folder" ] - enable_max_depth: true +#resources: +# RZ\Roadiz\CoreBundle\Entity\Folder: +# operations: +# ApiPlatform\Metadata\GetCollection: +# method: "GET" +# normalizationContext: +# groups: [ "folder" ] +# enable_max_depth: true +# ApiPlatform\Metadata\Get: +# method: "GET" +# normalizationContext: +# groups: [ "folder" ] +# enable_max_depth: true diff --git a/lib/RoadizCoreBundle/config/api_resources/node.yml b/lib/RoadizCoreBundle/config/api_resources/node.yml index 2d0aa331..ce20501e 100644 --- a/lib/RoadizCoreBundle/config/api_resources/node.yml +++ b/lib/RoadizCoreBundle/config/api_resources/node.yml @@ -1,8 +1,8 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\Node: - operations: - ApiPlatform\Metadata\Get: - method: 'GET' - normalizationContext: - groups: ["node", "document_display"] - enable_max_depth: true +#resources: +# RZ\Roadiz\CoreBundle\Entity\Node: +# operations: +# ApiPlatform\Metadata\Get: +# method: 'GET' +# normalizationContext: +# groups: ["node", "document_display"] +# enable_max_depth: true diff --git a/lib/RoadizCoreBundle/config/api_resources/nodes_sources.yml b/lib/RoadizCoreBundle/config/api_resources/nodes_sources.yml index 0674f810..9b379c70 100644 --- a/lib/RoadizCoreBundle/config/api_resources/nodes_sources.yml +++ b/lib/RoadizCoreBundle/config/api_resources/nodes_sources.yml @@ -1,66 +1,66 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\NodesSources: - operations: - ApiPlatform\Metadata\GetCollection: - method: "GET" - normalizationContext: - groups: - - nodes_sources_base - - nodes_sources_default - - user - - urls - - tag_base - - translation_base - - document_display - - api_nodes_sources_archives: - class: ApiPlatform\Metadata\GetCollection - method: 'GET' - uriTemplate: '/nodes_sources/archives' - pagination_enabled: false - pagination_client_enabled: false - extraProperties: - archive_enabled: true - archive_publication_field_name: publishedAt - normalizationContext: - groups: - - get - - archives - openapiContext: - summary: Get available NodesSources archives - parameters: ~ - description: | - Get available NodesSources archives (years and months) based on their `publishedAt` field - - api_nodes_sources_search: - class: ApiPlatform\Metadata\GetCollection - method: 'GET' - uriTemplate: '/nodes_sources/search' - controller: RZ\Roadiz\CoreBundle\Api\Controller\NodesSourcesSearchController - read: false - normalizationContext: - groups: - - get - - nodes_sources_base - - nodes_sources_default - - urls - - tag_base - - translation_base - - document_display - openapiContext: - summary: Search NodesSources resources - description: | - Search all website NodesSources resources using **Solr** full-text search engine - parameters: - - type: string - name: search - in: query - required: true - description: Search pattern - schema: - type: string - - ApiPlatform\Metadata\Get: - method: 'GET' - normalizationContext: - groups: ["nodes_sources", "urls", "tag_base", "translation_base", "document_display"] +#resources: +# RZ\Roadiz\CoreBundle\Entity\NodesSources: +# operations: +# ApiPlatform\Metadata\GetCollection: +# method: "GET" +# normalizationContext: +# groups: +# - nodes_sources_base +# - nodes_sources_default +# - user +# - urls +# - tag_base +# - translation_base +# - document_display +# +# api_nodes_sources_archives: +# class: ApiPlatform\Metadata\GetCollection +# method: 'GET' +# uriTemplate: '/nodes_sources/archives' +# pagination_enabled: false +# pagination_client_enabled: false +# extraProperties: +# archive_enabled: true +# archive_publication_field_name: publishedAt +# normalizationContext: +# groups: +# - get +# - archives +# openapiContext: +# summary: Get available NodesSources archives +# parameters: ~ +# description: | +# Get available NodesSources archives (years and months) based on their `publishedAt` field +# +# api_nodes_sources_search: +# class: ApiPlatform\Metadata\GetCollection +# method: 'GET' +# uriTemplate: '/nodes_sources/search' +# controller: RZ\Roadiz\CoreBundle\Api\Controller\NodesSourcesSearchController +# read: false +# normalizationContext: +# groups: +# - get +# - nodes_sources_base +# - nodes_sources_default +# - urls +# - tag_base +# - translation_base +# - document_display +# openapiContext: +# summary: Search NodesSources resources +# description: | +# Search all website NodesSources resources using **Solr** full-text search engine +# parameters: +# - type: string +# name: search +# in: query +# required: true +# description: Search pattern +# schema: +# type: string +# +# ApiPlatform\Metadata\Get: +# method: 'GET' +# normalizationContext: +# groups: ["nodes_sources", "urls", "tag_base", "translation_base", "document_display"] diff --git a/lib/RoadizCoreBundle/config/api_resources/realm.yml b/lib/RoadizCoreBundle/config/api_resources/realm.yml index 719d66ac..f0bc2faa 100644 --- a/lib/RoadizCoreBundle/config/api_resources/realm.yml +++ b/lib/RoadizCoreBundle/config/api_resources/realm.yml @@ -1,14 +1,14 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\Realm: - operations: - ApiPlatform\Metadata\GetCollection: - method: "GET" - normalizationContext: - groups: [ "realm" ] - enable_max_depth: true - - ApiPlatform\Metadata\Get: - method: "GET" - normalizationContext: - groups: [ "realm" ] - enable_max_depth: true +#resources: +# RZ\Roadiz\CoreBundle\Entity\Realm: +# operations: +# ApiPlatform\Metadata\GetCollection: +# method: "GET" +# normalizationContext: +# groups: [ "realm" ] +# enable_max_depth: true +# +# ApiPlatform\Metadata\Get: +# method: "GET" +# normalizationContext: +# groups: [ "realm" ] +# enable_max_depth: true diff --git a/lib/RoadizCoreBundle/config/api_resources/tag.yml b/lib/RoadizCoreBundle/config/api_resources/tag.yml index 51dec445..e9b64d16 100644 --- a/lib/RoadizCoreBundle/config/api_resources/tag.yml +++ b/lib/RoadizCoreBundle/config/api_resources/tag.yml @@ -1,18 +1,18 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\Tag: - operations: - ApiPlatform\Metadata\GetCollection: - method: "GET" - normalizationContext: - enable_max_depth: true - groups: - - tag_base - - ApiPlatform\Metadata\Get: - method: 'GET' - normalizationContext: - enable_max_depth: true - groups: - - tag - - tag_base - - tag_parent +#resources: +# RZ\Roadiz\CoreBundle\Entity\Tag: +# operations: +# ApiPlatform\Metadata\GetCollection: +# method: "GET" +# normalizationContext: +# enable_max_depth: true +# groups: +# - tag_base +# +# ApiPlatform\Metadata\Get: +# method: 'GET' +# normalizationContext: +# enable_max_depth: true +# groups: +# - tag +# - tag_base +# - tag_parent diff --git a/lib/RoadizCoreBundle/config/api_resources/translation.yml b/lib/RoadizCoreBundle/config/api_resources/translation.yml index 20e9fb7b..c0d56c1a 100644 --- a/lib/RoadizCoreBundle/config/api_resources/translation.yml +++ b/lib/RoadizCoreBundle/config/api_resources/translation.yml @@ -1,17 +1,17 @@ -resources: - RZ\Roadiz\CoreBundle\Entity\Translation: - operations: - ApiPlatform\Metadata\GetCollection: - method: "GET" - normalizationContext: - enable_max_depth: true - groups: - - translation_base - - ApiPlatform\Metadata\Get: - method: 'GET' - normalizationContext: - enable_max_depth: true - groups: - - translation_base - +#resources: +# RZ\Roadiz\CoreBundle\Entity\Translation: +# operations: +# ApiPlatform\Metadata\GetCollection: +# method: "GET" +# normalizationContext: +# enable_max_depth: true +# groups: +# - translation_base +# +# ApiPlatform\Metadata\Get: +# method: 'GET' +# normalizationContext: +# enable_max_depth: true +# groups: +# - translation_base +# diff --git a/lib/RoadizCoreBundle/config/api_resources/web_response.yml b/lib/RoadizCoreBundle/config/api_resources/web_response.yml index 4e7d92da..1c2a1d41 100644 --- a/lib/RoadizCoreBundle/config/api_resources/web_response.yml +++ b/lib/RoadizCoreBundle/config/api_resources/web_response.yml @@ -1,3 +1,3 @@ -resources: - RZ\Roadiz\CoreBundle\Api\Model\WebResponse: - operations: [] +#resources: +# RZ\Roadiz\CoreBundle\Api\Model\WebResponse: +# operations: []