api-platform / docs

API Platform documentation
https://api-platform.com/docs/
165 stars 1.07k forks source link

Document the url_generation_strategy #1263

Closed akserikawa closed 2 years ago

akserikawa commented 3 years ago

According to the Configuration docs the absolute_url option should return the IRI as absolute urls. However, on v2.6 this option is not recognized.

 Unrecognized option "absolute_url" under "api_platform". Available options are "allow_plain_identifiers", "asset_package", "collection", "default_operation_path_resolver", "defaults", "description", "doc  
  trine", "doctrine_mongodb_odm", "eager_loading", "elasticsearch", "enable_docs", "enable_entrypoint", "enable_fos_user", "enable_nelmio_api_doc", "enable_profiler", "enable_re_doc", "enable_swagger", "en  
  able_swagger_ui", "error_formats", "exception_to_status", "formats", "graphql", "http_cache", "mapping", "mercure", "messenger", "name_converter", "oauth", "openapi", "patch_formats", "path_segment_name_  
  generator", "resource_class_directories", "show_webby", "swagger", "title", "validator", "version".
BeyerJC commented 3 years ago

I just did a quick check and it seems like this option has never existed in any 2.* release. It would be a nice feature :-)

https://github.com/api-platform/core/blob/main/src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php

soyuka commented 3 years ago

Looks like this exists as defaults: url_generation_strategy: see https://github.com/api-platform/core/pull/3198/files#diff-44282ca370e2cbf030ccc5d9730b30543f513c4f52cb0a93f5697064b5b9464dR175

Keeping this open as not documented

hackzilla commented 3 years ago

@soyuka absolute_url will also need to be removed from the example configuration. This is why, I was trying to use it.

https://api-platform.com/docs/main/core/configuration/

alanpoulain commented 2 years ago

Removed here: https://github.com/api-platform/docs/commit/52f8cb42dd69d1bbe34c079d1d8fbb3dcc3be3f0