X-Git-Url: https://git.piment-noir.org/?p=Project_proches_de_moi-server.git;a=blobdiff_plain;f=config%2Fpackages%2Ffos_rest.yaml;fp=config%2Fpackages%2Ffos_rest.yaml;h=f7062898386a44e0f4f617eb93626f08024c48f2;hp=0440800d70a35ca21d63f2c0a7e0dadfc14b2da3;hb=9b636c8d45d9b7355cee4cf6105f6aeb1d4612fc;hpb=0813fc5484129570466cbaff9c7d3700366f85d7 diff --git a/config/packages/fos_rest.yaml b/config/packages/fos_rest.yaml index 0440800..f706289 100644 --- a/config/packages/fos_rest.yaml +++ b/config/packages/fos_rest.yaml @@ -13,3 +13,21 @@ fos_rest: ~ # format_listener: # rules: # - { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json, html ] } + + routing_loader: + include_format: false + view: + view_response_listener: true + mime_types: + json: ['application/json', 'application/json;version=1.0', 'application/json;version=2.0'] + format_listener: + rules: + - { path: '^/api', priorities: ['json'], fallback_format: 'json' } + body_listener: + enabled: true + versioning: + enabled: true + resolvers: + media_type: # Accept header + enabled: true + regex: '/(v|version)=(?P[0-9\.]+)/'