Add collection and new vocab + mess with repository

This commit is contained in:
2024-11-04 17:16:16 +01:00
parent f8e470b096
commit 0a41ff4a7b
28 changed files with 2599 additions and 38 deletions

View File

@@ -13,4 +13,6 @@ return [
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
];

View File

@@ -0,0 +1,7 @@
api_platform:
title: Hello API Platform
version: 1.0.0
defaults:
stateless: true
cache_headers:
vary: ['Content-Type', 'Authorization', 'Origin']

View File

@@ -4,7 +4,9 @@ framework:
csrf_protection: true
# Note that the session will be started ONLY if you read or write from it.
session: true
session:
enabled: true
cookie_lifetime: 3600
#esi: true
#fragments: true

View File

@@ -0,0 +1,10 @@
nelmio_cors:
defaults:
origin_regex: true
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_headers: ['Content-Type', 'Authorization']
expose_headers: ['Link']
max_age: 3600
paths:
'^/': null

View File

@@ -38,6 +38,9 @@ security:
- { path: ^/admin, roles: ROLE_ADMIN }
- { path: ^/profile, roles: ROLE_USER }
- { path: ^/bibliography, roles: ROLE_USER }
- { path: ^/collection, roles: ROLE_USER }
- { path: ^/object, roles: ROLE_USER }
- { path: ^/site, roles: ROLE_USER }
when@test:
security:

View File

@@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api