Loading config/v1/api.config.php +78 −3 Original line number Diff line number Diff line Loading @@ -6,11 +6,13 @@ return [ \SygalApi\V1\Rest\Ping\PingResource::class => \SygalApi\V1\Rest\Ping\PingResourceFactory::class, \SygalApi\V1\Rest\Diplomation\DiplomationResource::class => \SygalApi\V1\Rest\Diplomation\DiplomationResourceFactory::class, \SygalApi\V1\Rest\InscriptionAdministrative\InscriptionAdministrativeResource::class => \SygalApi\V1\Rest\InscriptionAdministrative\InscriptionAdministrativeResourceFactory::class, \SygalApi\V1\Rest\Doctorant\DoctorantResource::class => \SygalApi\V1\Rest\Doctorant\DoctorantResourceFactory::class, ], ], 'openapi_content_validation' => [ // 'controller' => 'validator' 'SygalApi\V1\Rest\InscriptionAdministrative\Controller' => 'SygalApi\V1\Rest\InscriptionAdministrative\OpenApiValidator', 'SygalApi\V1\Rest\Doctorant\Controller' => 'SygalApi\V1\Rest\Doctorant\OpenApiValidator', ], 'openapi_validator_specs' => [ // 'validator' => [config] Loading @@ -18,6 +20,10 @@ return [ 'oas_file_format' => 'yaml', 'oas_file_path' => __DIR__ . '/schema/inscription/doctorant-api-v1.yaml', ], 'SygalApi\V1\Rest\Doctorant\OpenApiValidator' => [ 'oas_file_format' => 'yaml', 'oas_file_path' => __DIR__ . '/schema/doctorant/doctorant-api-v1.yaml', ], ], 'router' => [ 'routes' => [ Loading Loading @@ -48,6 +54,15 @@ return [ ], ], ], 'api.rest.doctorant' => [ 'type' => 'Segment', 'options' => [ 'route' => '/doctorant[/:doctorant_id]', 'defaults' => [ 'controller' => 'SygalApi\\V1\\Rest\\Doctorant\\Controller', ], ], ], ], ], 'api-tools-rest' => [ Loading Loading @@ -117,27 +132,51 @@ return [ 'collection_class' => \SygalApi\V1\Rest\InscriptionAdministrative\InscriptionAdministrativeCollection::class, 'service_name' => 'InscriptionAdministrative', ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 'listener' => \SygalApi\V1\Rest\Doctorant\DoctorantResource::class, 'route_name' => 'api.rest.doctorant', 'route_identifier_name' => 'doctorant_id', 'collection_name' => 'doctorant', 'entity_http_methods' => [ 0 => 'GET', 1 => 'PATCH', 2 => 'PUT', 3 => 'DELETE', ], 'collection_http_methods' => [ 0 => 'GET', 1 => 'POST', ], 'collection_query_whitelist' => [], 'page_size' => 25, 'page_size_param' => null, 'entity_class' => \SygalApi\V1\Rest\Doctorant\DoctorantEntity::class, 'collection_class' => \SygalApi\V1\Rest\Doctorant\DoctorantCollection::class, 'service_name' => 'Doctorant', ], ], 'api-tools-content-negotiation' => [ 'controllers' => [ 'SygalApi\\V1\\Rest\\Ping\\Controller' => 'Json', 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Controller' => 'Json', 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => 'Json', 'SygalApi\\V1\\Rest\\Diplomation\\Controller' => 'Json', ], 'accept_whitelist' => [ 'SygalApi\\V1\\Rest\\Ping\\Controller' => [ 0 => 'application/vnd.api.v1+json', //1 => 'application/hal+json', 2 => 'application/json', ], 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Controller' => [ 0 => 'application/vnd.api.v1+json', //1 => 'application/hal+json', 2 => 'application/json', ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 0 => 'application/vnd.api.v1+json', 2 => 'application/json', ], 'SygalApi\\V1\\Rest\\Diplomation\\Controller' => [ 0 => 'application/vnd.api.v1+json', //1 => 'application/hal+json', 2 => 'application/json', ], ], Loading @@ -154,6 +193,10 @@ return [ 0 => 'application/vnd.api.v1+json', 1 => 'application/json', ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 0 => 'application/vnd.api.v1+json', 1 => 'application/json', ], ], ], 'api-tools-hal' => [ Loading Loading @@ -194,6 +237,18 @@ return [ 'route_identifier_name' => 'inscription_id', 'is_collection' => true, ], \SygalApi\V1\Rest\Doctorant\DoctorantEntity::class => [ 'entity_identifier_name' => 'id', 'route_name' => 'api.rest.doctorant', 'route_identifier_name' => 'doctorant_id', 'hydrator' => \Laminas\Hydrator\ArraySerializableHydrator::class, ], \SygalApi\V1\Rest\Doctorant\DoctorantCollection::class => [ 'entity_identifier_name' => 'id', 'route_name' => 'api.rest.doctorant', 'route_identifier_name' => 'doctorant_id', 'is_collection' => true, ], ], ], 'api-tools-content-validation' => [ Loading @@ -203,10 +258,14 @@ return [ 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Controller' => [ 'input_filter' => 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Validator', ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 'input_filter' => 'SygalApi\\V1\\Rest\\Doctorant\\Validator', ], ], 'input_filter_specs' => [ 'SygalApi\\V1\\Rest\\Diplomation\\Validator' => [], 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Validator' => [], 'SygalApi\\V1\\Rest\\Doctorant\\Validator' => [], ], 'api-tools-mvc-auth' => [ 'authorization' => [ Loading Loading @@ -258,6 +317,22 @@ return [ 'DELETE' => true, ], ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 'collection' => [ 'GET' => true, 'POST' => true, 'PUT' => false, 'PATCH' => false, 'DELETE' => false, ], 'entity' => [ 'GET' => true, 'POST' => false, 'PUT' => true, 'PATCH' => true, 'DELETE' => true, ], ], ], ], ]; config/v1/schema/doctorant/doctorant-api-v1.yaml 0 → 100644 +116 −0 Original line number Diff line number Diff line openapi: '3.0.1' info: description: | Il s'agit de l'API présentée par l'application de 3ème cycle pour gérer les échanges avec Pegase. Dans cette version initiale une seul flux est géré __Doctorants :__ ce flux permet de pousser les apprenants-doctorants de Pegase vers l'application de 3ème cycle title: Connecteur 3eme cycle pour Pegase v0 version: '0.1' servers: - url: https://api.server.test/v1 paths: /doctorant: post: tags: - doctorant summary: Ajout/modification d'un apprenant-doctorant description: Ajout/modification d'un apprenant-doctorant operationId: creerDoctorant requestBody: description: Les informations concernant un apprenant-doctorant required: true content: application/json: schema: $ref: '#/components/schemas/Doctorant' security: - idTokenAuth: [] responses: 201: description: Doctorant reçu 422: description: invalide 403: description: non autorise 500: description: erreur serveur components: securitySchemes: # Authorization: Bearer id.token. idTokenAuth: type: http scheme: basic schemas: Doctorant: type: object description: Les données de l'apprenant-doctorant required: - id - code - INE - nomDeNaissance - nomUsuel - prenom - genre - naissance properties: id: type: string description: id technique immuable Pegase de l'apprenant code: type: string description: le code Pegase de l'apprenant INE: type: string description: Le numéro INE de l'apprenant nomDeNaissance: type: string description: Le nom de naissance nomUsuel: type: string description: Le nom usuel prenom: type: string description: Le prénom deuxiemePrenom: type: string nullable: true description: Le deuxième prénom troisiemePrenom: type: string nullable: true description: Le troisième prénom prenomUsage: type: string nullable: true description: Le prénom d'usage (vide pour le moment) genre: type: string description: Les valeurs `M` ou `F` sont acceptées naissance: $ref: '#/components/schemas/Naissance' mailPersonnel: type: string format: email nullable: true description: Adresse de messagerie électronique personnelle mailUrgence: type: string format: email nullable: true description: Adresse de messagerie électronique d'urgence telephonePersonnel: type: string nullable: true description: Numéro de téléphone personnel telephoneUrgence: type: string nullable: true description: Numéro de téléphone d'urgence adresseFixeHorsPeriodeUniversitaire: description: Adresse postale hors periode universitaire $ref: '#/components/schemas/Adresse' adresseResidenceUniversitaire: description: Adresse postale universitaire $ref: '#/components/schemas/Adresse' src/V1/Extractor/AbstractExtractor.php +1 −1 Original line number Diff line number Diff line <?php namespace SygalApi\V1\Rest\InscriptionAdministrative\Extractor; namespace SygalApi\V1\Extractor; use Laminas\Hydrator\ExtractionInterface; use Laminas\Hydrator\Strategy\StrategyEnabledInterface; Loading src/V1/Rest/Doctorant/DoctorantCollection.php 0 → 100644 +8 −0 Original line number Diff line number Diff line <?php namespace SygalApi\V1\Rest\Doctorant; use Laminas\Paginator\Paginator; class DoctorantCollection extends Paginator { } src/V1/Rest/Doctorant/DoctorantEntity.php 0 → 100644 +12 −0 Original line number Diff line number Diff line <?php namespace SygalApi\V1\Rest\Doctorant; use stdClass; class DoctorantEntity { public string $instancePegase; public stdclass $apprenant; public stdclass $inscription; } Loading
config/v1/api.config.php +78 −3 Original line number Diff line number Diff line Loading @@ -6,11 +6,13 @@ return [ \SygalApi\V1\Rest\Ping\PingResource::class => \SygalApi\V1\Rest\Ping\PingResourceFactory::class, \SygalApi\V1\Rest\Diplomation\DiplomationResource::class => \SygalApi\V1\Rest\Diplomation\DiplomationResourceFactory::class, \SygalApi\V1\Rest\InscriptionAdministrative\InscriptionAdministrativeResource::class => \SygalApi\V1\Rest\InscriptionAdministrative\InscriptionAdministrativeResourceFactory::class, \SygalApi\V1\Rest\Doctorant\DoctorantResource::class => \SygalApi\V1\Rest\Doctorant\DoctorantResourceFactory::class, ], ], 'openapi_content_validation' => [ // 'controller' => 'validator' 'SygalApi\V1\Rest\InscriptionAdministrative\Controller' => 'SygalApi\V1\Rest\InscriptionAdministrative\OpenApiValidator', 'SygalApi\V1\Rest\Doctorant\Controller' => 'SygalApi\V1\Rest\Doctorant\OpenApiValidator', ], 'openapi_validator_specs' => [ // 'validator' => [config] Loading @@ -18,6 +20,10 @@ return [ 'oas_file_format' => 'yaml', 'oas_file_path' => __DIR__ . '/schema/inscription/doctorant-api-v1.yaml', ], 'SygalApi\V1\Rest\Doctorant\OpenApiValidator' => [ 'oas_file_format' => 'yaml', 'oas_file_path' => __DIR__ . '/schema/doctorant/doctorant-api-v1.yaml', ], ], 'router' => [ 'routes' => [ Loading Loading @@ -48,6 +54,15 @@ return [ ], ], ], 'api.rest.doctorant' => [ 'type' => 'Segment', 'options' => [ 'route' => '/doctorant[/:doctorant_id]', 'defaults' => [ 'controller' => 'SygalApi\\V1\\Rest\\Doctorant\\Controller', ], ], ], ], ], 'api-tools-rest' => [ Loading Loading @@ -117,27 +132,51 @@ return [ 'collection_class' => \SygalApi\V1\Rest\InscriptionAdministrative\InscriptionAdministrativeCollection::class, 'service_name' => 'InscriptionAdministrative', ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 'listener' => \SygalApi\V1\Rest\Doctorant\DoctorantResource::class, 'route_name' => 'api.rest.doctorant', 'route_identifier_name' => 'doctorant_id', 'collection_name' => 'doctorant', 'entity_http_methods' => [ 0 => 'GET', 1 => 'PATCH', 2 => 'PUT', 3 => 'DELETE', ], 'collection_http_methods' => [ 0 => 'GET', 1 => 'POST', ], 'collection_query_whitelist' => [], 'page_size' => 25, 'page_size_param' => null, 'entity_class' => \SygalApi\V1\Rest\Doctorant\DoctorantEntity::class, 'collection_class' => \SygalApi\V1\Rest\Doctorant\DoctorantCollection::class, 'service_name' => 'Doctorant', ], ], 'api-tools-content-negotiation' => [ 'controllers' => [ 'SygalApi\\V1\\Rest\\Ping\\Controller' => 'Json', 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Controller' => 'Json', 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => 'Json', 'SygalApi\\V1\\Rest\\Diplomation\\Controller' => 'Json', ], 'accept_whitelist' => [ 'SygalApi\\V1\\Rest\\Ping\\Controller' => [ 0 => 'application/vnd.api.v1+json', //1 => 'application/hal+json', 2 => 'application/json', ], 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Controller' => [ 0 => 'application/vnd.api.v1+json', //1 => 'application/hal+json', 2 => 'application/json', ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 0 => 'application/vnd.api.v1+json', 2 => 'application/json', ], 'SygalApi\\V1\\Rest\\Diplomation\\Controller' => [ 0 => 'application/vnd.api.v1+json', //1 => 'application/hal+json', 2 => 'application/json', ], ], Loading @@ -154,6 +193,10 @@ return [ 0 => 'application/vnd.api.v1+json', 1 => 'application/json', ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 0 => 'application/vnd.api.v1+json', 1 => 'application/json', ], ], ], 'api-tools-hal' => [ Loading Loading @@ -194,6 +237,18 @@ return [ 'route_identifier_name' => 'inscription_id', 'is_collection' => true, ], \SygalApi\V1\Rest\Doctorant\DoctorantEntity::class => [ 'entity_identifier_name' => 'id', 'route_name' => 'api.rest.doctorant', 'route_identifier_name' => 'doctorant_id', 'hydrator' => \Laminas\Hydrator\ArraySerializableHydrator::class, ], \SygalApi\V1\Rest\Doctorant\DoctorantCollection::class => [ 'entity_identifier_name' => 'id', 'route_name' => 'api.rest.doctorant', 'route_identifier_name' => 'doctorant_id', 'is_collection' => true, ], ], ], 'api-tools-content-validation' => [ Loading @@ -203,10 +258,14 @@ return [ 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Controller' => [ 'input_filter' => 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Validator', ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 'input_filter' => 'SygalApi\\V1\\Rest\\Doctorant\\Validator', ], ], 'input_filter_specs' => [ 'SygalApi\\V1\\Rest\\Diplomation\\Validator' => [], 'SygalApi\\V1\\Rest\\InscriptionAdministrative\\Validator' => [], 'SygalApi\\V1\\Rest\\Doctorant\\Validator' => [], ], 'api-tools-mvc-auth' => [ 'authorization' => [ Loading Loading @@ -258,6 +317,22 @@ return [ 'DELETE' => true, ], ], 'SygalApi\\V1\\Rest\\Doctorant\\Controller' => [ 'collection' => [ 'GET' => true, 'POST' => true, 'PUT' => false, 'PATCH' => false, 'DELETE' => false, ], 'entity' => [ 'GET' => true, 'POST' => false, 'PUT' => true, 'PATCH' => true, 'DELETE' => true, ], ], ], ], ];
config/v1/schema/doctorant/doctorant-api-v1.yaml 0 → 100644 +116 −0 Original line number Diff line number Diff line openapi: '3.0.1' info: description: | Il s'agit de l'API présentée par l'application de 3ème cycle pour gérer les échanges avec Pegase. Dans cette version initiale une seul flux est géré __Doctorants :__ ce flux permet de pousser les apprenants-doctorants de Pegase vers l'application de 3ème cycle title: Connecteur 3eme cycle pour Pegase v0 version: '0.1' servers: - url: https://api.server.test/v1 paths: /doctorant: post: tags: - doctorant summary: Ajout/modification d'un apprenant-doctorant description: Ajout/modification d'un apprenant-doctorant operationId: creerDoctorant requestBody: description: Les informations concernant un apprenant-doctorant required: true content: application/json: schema: $ref: '#/components/schemas/Doctorant' security: - idTokenAuth: [] responses: 201: description: Doctorant reçu 422: description: invalide 403: description: non autorise 500: description: erreur serveur components: securitySchemes: # Authorization: Bearer id.token. idTokenAuth: type: http scheme: basic schemas: Doctorant: type: object description: Les données de l'apprenant-doctorant required: - id - code - INE - nomDeNaissance - nomUsuel - prenom - genre - naissance properties: id: type: string description: id technique immuable Pegase de l'apprenant code: type: string description: le code Pegase de l'apprenant INE: type: string description: Le numéro INE de l'apprenant nomDeNaissance: type: string description: Le nom de naissance nomUsuel: type: string description: Le nom usuel prenom: type: string description: Le prénom deuxiemePrenom: type: string nullable: true description: Le deuxième prénom troisiemePrenom: type: string nullable: true description: Le troisième prénom prenomUsage: type: string nullable: true description: Le prénom d'usage (vide pour le moment) genre: type: string description: Les valeurs `M` ou `F` sont acceptées naissance: $ref: '#/components/schemas/Naissance' mailPersonnel: type: string format: email nullable: true description: Adresse de messagerie électronique personnelle mailUrgence: type: string format: email nullable: true description: Adresse de messagerie électronique d'urgence telephonePersonnel: type: string nullable: true description: Numéro de téléphone personnel telephoneUrgence: type: string nullable: true description: Numéro de téléphone d'urgence adresseFixeHorsPeriodeUniversitaire: description: Adresse postale hors periode universitaire $ref: '#/components/schemas/Adresse' adresseResidenceUniversitaire: description: Adresse postale universitaire $ref: '#/components/schemas/Adresse'
src/V1/Extractor/AbstractExtractor.php +1 −1 Original line number Diff line number Diff line <?php namespace SygalApi\V1\Rest\InscriptionAdministrative\Extractor; namespace SygalApi\V1\Extractor; use Laminas\Hydrator\ExtractionInterface; use Laminas\Hydrator\Strategy\StrategyEnabledInterface; Loading
src/V1/Rest/Doctorant/DoctorantCollection.php 0 → 100644 +8 −0 Original line number Diff line number Diff line <?php namespace SygalApi\V1\Rest\Doctorant; use Laminas\Paginator\Paginator; class DoctorantCollection extends Paginator { }
src/V1/Rest/Doctorant/DoctorantEntity.php 0 → 100644 +12 −0 Original line number Diff line number Diff line <?php namespace SygalApi\V1\Rest\Doctorant; use stdClass; class DoctorantEntity { public string $instancePegase; public stdclass $apprenant; public stdclass $inscription; }