domain-watchdog/config/packages/api_platform.yaml

51 lines
2.0 KiB
YAML
Raw Normal View History

2024-07-17 00:19:27 +02:00
api_platform:
title: Domain Watchdog API
version: 1.0.0
2024-08-02 13:10:19 +02:00
asset_package: 'api_platform'
2024-07-17 00:19:27 +02:00
formats:
2024-07-18 12:36:01 +02:00
jsonld: [ 'application/ld+json' ]
2024-07-18 14:01:16 +02:00
xml: [ 'application/xml' ]
2024-07-18 12:36:01 +02:00
json: [ 'application/json' ]
2024-08-02 01:23:53 +02:00
text: [ 'text/calendar' ]
2024-07-17 00:19:27 +02:00
docs_formats:
2024-07-18 12:36:01 +02:00
jsonld: [ 'application/ld+json' ]
jsonopenapi: [ 'application/vnd.openapi+json' ]
html: [ 'text/html' ]
2024-07-17 00:19:27 +02:00
defaults:
stateless: true
cache_headers:
2024-07-18 12:36:01 +02:00
vary: [ 'Content-Type', 'Authorization', 'Origin' ]
pagination_client_items_per_page: true
2024-07-17 00:19:27 +02:00
extra_properties:
standard_put: true
rfc_7807_compliant_errors: true
keep_legacy_inflector: false
use_symfony_listeners: true
show_webby: false
2024-07-18 12:36:01 +02:00
swagger:
api_keys:
JWT:
name: Authorization
type: header
2025-10-07 15:55:17 +02:00
exception_to_status:
# The 4 following handlers are registered by default, keep those lines to prevent unexpected side effects
Symfony\Component\Serializer\Exception\ExceptionInterface: 400 # Use a raw status code (recommended)
ApiPlatform\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
ApiPlatform\ParameterValidator\Exception\ValidationExceptionInterface: 400
Doctrine\ORM\OptimisticLockException: 409
2024-07-18 12:36:01 +02:00
2025-10-07 15:55:17 +02:00
# Validation exception
ApiPlatform\Validator\Exception\ValidationException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_UNPROCESSABLE_ENTITY
App\Exception\DomainNotFoundException: 404
App\Exception\MalformedDomainException: 400
App\Exception\TldNotSupportedException: 400
App\Exception\UnknownRdapServerException: 400
App\Exception\UnsupportedDsnScheme: 400
App\Exception\RdapServerException: 400
# Provider exception
App\Exception\Provider\UserNoExplicitConsentException: 451
App\Exception\Provider\AbstractProviderException: 400
Metaregistrar\EPP\eppException: 400