├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── codecov.yml ├── composer.json ├── phpunit.baseline.xml ├── pmu.baseline ├── src ├── ApiResource │ └── Error.php ├── Doctrine │ ├── Common │ │ ├── CollectionPaginator.php │ │ ├── Filter │ │ │ ├── BackedEnumFilterTrait.php │ │ │ ├── BooleanFilterTrait.php │ │ │ ├── DateFilterInterface.php │ │ │ ├── DateFilterTrait.php │ │ │ ├── ExistsFilterInterface.php │ │ │ ├── ExistsFilterTrait.php │ │ │ ├── ManagerRegistryAwareInterface.php │ │ │ ├── NumericFilterTrait.php │ │ │ ├── OrderFilterInterface.php │ │ │ ├── OrderFilterTrait.php │ │ │ ├── PropertyAwareFilterInterface.php │ │ │ ├── PropertyPlaceholderOpenApiParameterTrait.php │ │ │ ├── RangeFilterInterface.php │ │ │ ├── RangeFilterTrait.php │ │ │ ├── SearchFilterInterface.php │ │ │ └── SearchFilterTrait.php │ │ ├── LICENSE │ │ ├── Messenger │ │ │ └── DispatchTrait.php │ │ ├── ParameterValueExtractorTrait.php │ │ ├── PropertyHelperTrait.php │ │ ├── README.md │ │ ├── SelectablePaginator.php │ │ ├── SelectablePartialPaginator.php │ │ ├── State │ │ │ ├── LinksHandlerLocatorTrait.php │ │ │ ├── LinksHandlerTrait.php │ │ │ ├── Options.php │ │ │ ├── PersistProcessor.php │ │ │ └── RemoveProcessor.php │ │ └── composer.json │ ├── Odm │ │ ├── Extension │ │ │ ├── AggregationCollectionExtensionInterface.php │ │ │ ├── AggregationItemExtensionInterface.php │ │ │ ├── AggregationResultCollectionExtensionInterface.php │ │ │ ├── AggregationResultItemExtensionInterface.php │ │ │ ├── FilterExtension.php │ │ │ ├── OrderExtension.php │ │ │ ├── PaginationExtension.php │ │ │ └── ParameterExtension.php │ │ ├── Filter │ │ │ ├── AbstractFilter.php │ │ │ ├── BooleanFilter.php │ │ │ ├── DateFilter.php │ │ │ ├── ExistsFilter.php │ │ │ ├── FilterInterface.php │ │ │ ├── NumericFilter.php │ │ │ ├── OrderFilter.php │ │ │ ├── RangeFilter.php │ │ │ └── SearchFilter.php │ │ ├── LICENSE │ │ ├── Metadata │ │ │ ├── Property │ │ │ │ └── DoctrineMongoDbOdmPropertyMetadataFactory.php │ │ │ └── Resource │ │ │ │ └── DoctrineMongoDbOdmResourceCollectionMetadataFactory.php │ │ ├── Paginator.php │ │ ├── PropertyHelperTrait.php │ │ ├── PropertyInfo │ │ │ └── DoctrineExtractor.php │ │ ├── README.md │ │ ├── State │ │ │ ├── CollectionProvider.php │ │ │ ├── ItemProvider.php │ │ │ ├── LinksHandler.php │ │ │ ├── LinksHandlerInterface.php │ │ │ ├── LinksHandlerTrait.php │ │ │ └── Options.php │ │ └── composer.json │ └── Orm │ │ ├── AbstractPaginator.php │ │ ├── Extension │ │ ├── DoctrinePaginatorFactory.php │ │ ├── EagerLoadingExtension.php │ │ ├── FilterEagerLoadingExtension.php │ │ ├── FilterExtension.php │ │ ├── OrderExtension.php │ │ ├── PaginationExtension.php │ │ ├── ParameterExtension.php │ │ ├── QueryCollectionExtensionInterface.php │ │ ├── QueryItemExtensionInterface.php │ │ ├── QueryResultCollectionExtensionInterface.php │ │ └── QueryResultItemExtensionInterface.php │ │ ├── Filter │ │ ├── AbstractFilter.php │ │ ├── BackedEnumFilter.php │ │ ├── BooleanFilter.php │ │ ├── DateFilter.php │ │ ├── ExistsFilter.php │ │ ├── FilterInterface.php │ │ ├── NumericFilter.php │ │ ├── OrderFilter.php │ │ ├── RangeFilter.php │ │ └── SearchFilter.php │ │ ├── LICENSE │ │ ├── Metadata │ │ ├── Property │ │ │ └── DoctrineOrmPropertyMetadataFactory.php │ │ └── Resource │ │ │ ├── DoctrineOrmLinkFactory.php │ │ │ └── DoctrineOrmResourceCollectionMetadataFactory.php │ │ ├── Paginator.php │ │ ├── PropertyHelperTrait.php │ │ ├── QueryAwareInterface.php │ │ ├── README.md │ │ ├── State │ │ ├── CollectionProvider.php │ │ ├── ItemProvider.php │ │ ├── LinksHandler.php │ │ ├── LinksHandlerInterface.php │ │ ├── LinksHandlerTrait.php │ │ └── Options.php │ │ ├── Util │ │ ├── QueryBuilderHelper.php │ │ ├── QueryChecker.php │ │ ├── QueryNameGenerator.php │ │ └── QueryNameGeneratorInterface.php │ │ └── composer.json ├── Documentation │ ├── Action │ │ ├── DocumentationAction.php │ │ └── EntrypointAction.php │ ├── Documentation.php │ ├── DocumentationInterface.php │ ├── Entrypoint.php │ ├── LICENSE │ ├── README.md │ └── composer.json ├── Elasticsearch │ ├── Exception │ │ ├── ExceptionInterface.php │ │ ├── IndexNotFoundException.php │ │ └── NonUniqueIdentifierException.php │ ├── Extension │ │ ├── AbstractFilterExtension.php │ │ ├── ConstantScoreFilterExtension.php │ │ ├── RequestBodySearchCollectionExtensionInterface.php │ │ ├── SortExtension.php │ │ └── SortFilterExtension.php │ ├── Filter │ │ ├── AbstractFilter.php │ │ ├── AbstractSearchFilter.php │ │ ├── ConstantScoreFilterInterface.php │ │ ├── FilterInterface.php │ │ ├── MatchFilter.php │ │ ├── OrderFilter.php │ │ ├── SortFilterInterface.php │ │ └── TermFilter.php │ ├── LICENSE │ ├── Metadata │ │ └── Resource │ │ │ └── Factory │ │ │ └── ElasticsearchProviderResourceMetadataCollectionFactory.php │ ├── Paginator.php │ ├── README.md │ ├── Serializer │ │ ├── DocumentNormalizer.php │ │ ├── ItemNormalizer.php │ │ └── NameConverter │ │ │ └── InnerFieldsNameConverter.php │ ├── State │ │ ├── CollectionProvider.php │ │ ├── ItemProvider.php │ │ └── Options.php │ ├── Util │ │ └── FieldDatatypeTrait.php │ └── composer.json ├── GraphQl │ ├── Action │ │ ├── EntrypointAction.php │ │ ├── GraphQlPlaygroundAction.php │ │ └── GraphiQlAction.php │ ├── Error │ │ ├── ErrorHandler.php │ │ └── ErrorHandlerInterface.php │ ├── Exception │ │ └── InvalidTypeException.php │ ├── Executor.php │ ├── ExecutorInterface.php │ ├── LICENSE │ ├── Metadata │ │ └── RuntimeOperationMetadataFactory.php │ ├── README.md │ ├── Resolver │ │ ├── Factory │ │ │ ├── ResolverFactory.php │ │ │ └── ResolverFactoryInterface.php │ │ ├── MutationResolverInterface.php │ │ ├── QueryCollectionResolverInterface.php │ │ ├── QueryItemResolverInterface.php │ │ ├── ResourceFieldResolver.php │ │ └── Util │ │ │ └── IdentifierTrait.php │ ├── Serializer │ │ ├── Exception │ │ │ ├── ErrorNormalizer.php │ │ │ ├── HttpExceptionNormalizer.php │ │ │ ├── RuntimeExceptionNormalizer.php │ │ │ └── ValidationExceptionNormalizer.php │ │ ├── ItemNormalizer.php │ │ ├── ObjectNormalizer.php │ │ ├── SerializerContextBuilder.php │ │ └── SerializerContextBuilderInterface.php │ ├── State │ │ ├── Processor │ │ │ ├── NormalizeProcessor.php │ │ │ └── SubscriptionProcessor.php │ │ └── Provider │ │ │ ├── DenormalizeProvider.php │ │ │ ├── NoopProvider.php │ │ │ ├── ReadProvider.php │ │ │ └── ResolverProvider.php │ ├── Subscription │ │ ├── MercureSubscriptionIriGenerator.php │ │ ├── MercureSubscriptionIriGeneratorInterface.php │ │ ├── OperationAwareSubscriptionManagerInterface.php │ │ ├── SubscriptionIdentifierGenerator.php │ │ ├── SubscriptionIdentifierGeneratorInterface.php │ │ ├── SubscriptionManager.php │ │ └── SubscriptionManagerInterface.php │ ├── Type │ │ ├── ContextAwareTypeBuilderInterface.php │ │ ├── Definition │ │ │ ├── IterableType.php │ │ │ ├── TypeInterface.php │ │ │ └── UploadType.php │ │ ├── FieldsBuilder.php │ │ ├── FieldsBuilderEnumInterface.php │ │ ├── SchemaBuilder.php │ │ ├── SchemaBuilderInterface.php │ │ ├── TypeBuilder.php │ │ ├── TypeConverter.php │ │ ├── TypeConverterInterface.php │ │ ├── TypeNotFoundException.php │ │ ├── TypesContainer.php │ │ ├── TypesContainerInterface.php │ │ ├── TypesFactory.php │ │ └── TypesFactoryInterface.php │ ├── Util │ │ └── ArrayTrait.php │ └── composer.json ├── Hal │ ├── JsonSchema │ │ └── SchemaFactory.php │ ├── README.md │ ├── Serializer │ │ ├── CollectionNormalizer.php │ │ ├── EntrypointNormalizer.php │ │ ├── ItemNormalizer.php │ │ └── ObjectNormalizer.php │ └── composer.json ├── HttpCache │ ├── LICENSE │ ├── PurgerInterface.php │ ├── README.md │ ├── SouinPurger.php │ ├── State │ │ ├── AddHeadersProcessor.php │ │ └── AddTagsProcessor.php │ ├── SurrogateKeysPurger.php │ ├── VarnishPurger.php │ ├── VarnishXKeyPurger.php │ └── composer.json ├── Hydra │ ├── JsonSchema │ │ └── SchemaFactory.php │ ├── LICENSE │ ├── README.md │ ├── Serializer │ │ ├── CollectionFiltersNormalizer.php │ │ ├── CollectionNormalizer.php │ │ ├── ConstraintViolationListNormalizer.php │ │ ├── DocumentationNormalizer.php │ │ ├── EntrypointNormalizer.php │ │ ├── HydraPrefixNameConverter.php │ │ └── PartialCollectionViewNormalizer.php │ ├── State │ │ └── HydraLinkProcessor.php │ └── composer.json ├── JsonApi │ ├── Filter │ │ ├── SparseFieldset.php │ │ └── SparseFieldsetParameterProvider.php │ ├── JsonSchema │ │ └── SchemaFactory.php │ ├── README.md │ ├── Serializer │ │ ├── CollectionNormalizer.php │ │ ├── ConstraintViolationListNormalizer.php │ │ ├── EntrypointNormalizer.php │ │ ├── ErrorNormalizer.php │ │ ├── ErrorNormalizerTrait.php │ │ ├── ItemNormalizer.php │ │ ├── ObjectNormalizer.php │ │ └── ReservedAttributeNameConverter.php │ ├── State │ │ └── JsonApiProvider.php │ └── composer.json ├── JsonLd │ ├── Action │ │ └── ContextAction.php │ ├── AnonymousContextBuilderInterface.php │ ├── ContextBuilder.php │ ├── ContextBuilderInterface.php │ ├── HydraContext.php │ ├── README.md │ ├── Serializer │ │ ├── ErrorNormalizer.php │ │ ├── HydraPrefixTrait.php │ │ ├── ItemNormalizer.php │ │ ├── JsonLdContextTrait.php │ │ └── ObjectNormalizer.php │ └── composer.json ├── JsonSchema │ ├── BackwardCompatibleSchemaFactory.php │ ├── Command │ │ └── JsonSchemaGenerateCommand.php │ ├── DefinitionNameFactory.php │ ├── DefinitionNameFactoryInterface.php │ ├── LICENSE │ ├── Metadata │ │ └── Property │ │ │ └── Factory │ │ │ └── SchemaPropertyMetadataFactory.php │ ├── README.md │ ├── ResourceMetadataTrait.php │ ├── Schema.php │ ├── SchemaFactory.php │ ├── SchemaFactoryAwareInterface.php │ ├── SchemaFactoryInterface.php │ ├── SchemaUriPrefixTrait.php │ └── composer.json ├── Laravel │ ├── ApiPlatformDeferredProvider.php │ ├── ApiPlatformMiddleware.php │ ├── ApiPlatformProvider.php │ ├── ApiResource │ │ ├── Error.php │ │ └── ValidationError.php │ ├── CONTRIBUTING.md │ ├── Console │ │ ├── InstallCommand.php │ │ └── Maker │ │ │ ├── AbstractMakeStateCommand.php │ │ │ ├── MakeStateProcessorCommand.php │ │ │ ├── MakeStateProviderCommand.php │ │ │ ├── Resources │ │ │ └── skeleton │ │ │ │ ├── StateProcessor.php.tpl │ │ │ │ └── StateProvider.php.tpl │ │ │ └── Utils │ │ │ ├── AppServiceProviderTagger.php │ │ │ ├── StateTemplateGenerator.php │ │ │ ├── StateTypeEnum.php │ │ │ └── SuccessMessageTrait.php │ ├── Controller │ │ ├── ApiPlatformController.php │ │ ├── DocumentationController.php │ │ └── EntrypointController.php │ ├── Eloquent │ │ ├── Extension │ │ │ ├── FilterQueryExtension.php │ │ │ └── QueryExtensionInterface.php │ │ ├── Filter │ │ │ ├── BooleanFilter.php │ │ │ ├── DateFilter.php │ │ │ ├── EndSearchFilter.php │ │ │ ├── EqualsFilter.php │ │ │ ├── FilterInterface.php │ │ │ ├── JsonApi │ │ │ │ ├── SortFilter.php │ │ │ │ └── SortFilterParameterProvider.php │ │ │ ├── OrFilter.php │ │ │ ├── OrderFilter.php │ │ │ ├── PartialSearchFilter.php │ │ │ ├── QueryPropertyTrait.php │ │ │ ├── RangeFilter.php │ │ │ └── StartSearchFilter.php │ │ ├── Metadata │ │ │ ├── Factory │ │ │ │ ├── Property │ │ │ │ │ ├── EloquentAttributePropertyMetadataFactory.php │ │ │ │ │ ├── EloquentPropertyMetadataFactory.php │ │ │ │ │ └── EloquentPropertyNameCollectionMetadataFactory.php │ │ │ │ └── Resource │ │ │ │ │ └── EloquentResourceCollectionMetadataFactory.php │ │ │ ├── IdentifiersExtractor.php │ │ │ ├── ModelMetadata.php │ │ │ └── ResourceClassResolver.php │ │ ├── Paginator.php │ │ ├── PartialPaginator.php │ │ ├── PropertyAccess │ │ │ └── PropertyAccessor.php │ │ ├── Serializer │ │ │ └── SerializerContextBuilder.php │ │ └── State │ │ │ ├── CollectionProvider.php │ │ │ ├── ItemProvider.php │ │ │ ├── LinksHandler.php │ │ │ ├── LinksHandlerInterface.php │ │ │ ├── LinksHandlerLocatorTrait.php │ │ │ ├── Options.php │ │ │ ├── PersistProcessor.php │ │ │ └── RemoveProcessor.php │ ├── Exception │ │ └── ErrorHandler.php │ ├── GraphQl │ │ └── Controller │ │ │ ├── EntrypointController.php │ │ │ └── GraphiQlController.php │ ├── JsonApi │ │ └── State │ │ │ └── JsonApiProvider.php │ ├── LICENSE │ ├── Metadata │ │ ├── CachePropertyMetadataFactory.php │ │ ├── CachePropertyNameCollectionMetadataFactory.php │ │ ├── CacheResourceCollectionMetadataFactory.php │ │ └── ParameterValidationResourceMetadataCollectionFactory.php │ ├── README.md │ ├── Routing │ │ ├── IriConverter.php │ │ ├── Router.php │ │ └── SkolemIriConverter.php │ ├── Security │ │ └── ResourceAccessChecker.php │ ├── ServiceLocator.php │ ├── State │ │ ├── AccessCheckerProvider.php │ │ ├── ParameterValidatorProvider.php │ │ ├── SwaggerUiProcessor.php │ │ ├── SwaggerUiProvider.php │ │ ├── ValidateProvider.php │ │ └── ValidationErrorTrait.php │ ├── Test │ │ ├── ApiTestAssertionsTrait.php │ │ └── Constraint │ │ │ ├── ArraySubset.php │ │ │ └── ArraySubsetTrait.php │ ├── composer.json │ ├── config │ │ └── api-platform.php │ ├── public │ │ ├── 400.css │ │ ├── 700.css │ │ ├── car.svg │ │ ├── es6-promise │ │ │ └── es6-promise.auto.min.js │ │ ├── fetch │ │ │ └── fetch.js │ │ ├── fonts │ │ │ └── open-sans │ │ │ │ ├── 400.css │ │ │ │ ├── 700.css │ │ │ │ └── files │ │ │ │ ├── open-sans-cyrillic-400-normal.woff │ │ │ │ ├── open-sans-cyrillic-400-normal.woff2 │ │ │ │ ├── open-sans-cyrillic-700-normal.woff │ │ │ │ ├── open-sans-cyrillic-700-normal.woff2 │ │ │ │ ├── open-sans-cyrillic-ext-400-normal.woff │ │ │ │ ├── open-sans-cyrillic-ext-400-normal.woff2 │ │ │ │ ├── open-sans-cyrillic-ext-700-normal.woff │ │ │ │ ├── open-sans-cyrillic-ext-700-normal.woff2 │ │ │ │ ├── open-sans-greek-400-normal.woff │ │ │ │ ├── open-sans-greek-400-normal.woff2 │ │ │ │ ├── open-sans-greek-700-normal.woff │ │ │ │ ├── open-sans-greek-700-normal.woff2 │ │ │ │ ├── open-sans-greek-ext-400-normal.woff │ │ │ │ ├── open-sans-greek-ext-400-normal.woff2 │ │ │ │ ├── open-sans-greek-ext-700-normal.woff │ │ │ │ ├── open-sans-greek-ext-700-normal.woff2 │ │ │ │ ├── open-sans-hebrew-400-normal.woff │ │ │ │ ├── open-sans-hebrew-400-normal.woff2 │ │ │ │ ├── open-sans-hebrew-700-normal.woff │ │ │ │ ├── open-sans-hebrew-700-normal.woff2 │ │ │ │ ├── open-sans-latin-400-normal.woff │ │ │ │ ├── open-sans-latin-400-normal.woff2 │ │ │ │ ├── open-sans-latin-700-normal.woff │ │ │ │ ├── open-sans-latin-700-normal.woff2 │ │ │ │ ├── open-sans-latin-ext-400-normal.woff │ │ │ │ ├── open-sans-latin-ext-400-normal.woff2 │ │ │ │ ├── open-sans-latin-ext-700-normal.woff │ │ │ │ ├── open-sans-latin-ext-700-normal.woff2 │ │ │ │ ├── open-sans-math-400-normal.woff │ │ │ │ ├── open-sans-math-400-normal.woff2 │ │ │ │ ├── open-sans-math-700-normal.woff │ │ │ │ ├── open-sans-math-700-normal.woff2 │ │ │ │ ├── open-sans-symbols-400-normal.woff │ │ │ │ ├── open-sans-symbols-400-normal.woff2 │ │ │ │ ├── open-sans-symbols-700-normal.woff │ │ │ │ ├── open-sans-symbols-700-normal.woff2 │ │ │ │ ├── open-sans-vietnamese-400-normal.woff │ │ │ │ ├── open-sans-vietnamese-400-normal.woff2 │ │ │ │ ├── open-sans-vietnamese-700-normal.woff │ │ │ │ └── open-sans-vietnamese-700-normal.woff2 │ │ ├── graphiql-style.css │ │ ├── graphiql │ │ │ ├── graphiql.css │ │ │ └── graphiql.min.js │ │ ├── graphql-playground-style.css │ │ ├── graphql-playground │ │ │ ├── index.css │ │ │ └── middleware.js │ │ ├── init-common-ui.js │ │ ├── init-graphiql.js │ │ ├── init-graphql-playground.js │ │ ├── init-redoc-ui.js │ │ ├── init-swagger-ui.js │ │ ├── logo-header.svg │ │ ├── react │ │ │ ├── react-dom.production.min.js │ │ │ └── react.production.min.js │ │ ├── redoc │ │ │ └── redoc.standalone.js │ │ ├── style.css │ │ ├── swagger-ui-bundle.js │ │ ├── swagger-ui-standalone-preset.js │ │ ├── swagger-ui.css │ │ ├── swagger-ui │ │ │ ├── oauth2-redirect.html │ │ │ ├── swagger-ui-bundle.js │ │ │ ├── swagger-ui-standalone-preset.js │ │ │ ├── swagger-ui.css │ │ │ └── swagger-ui.css.map │ │ ├── web.png │ │ └── webby.png │ ├── resources │ │ └── views │ │ │ ├── graphiql.blade.php │ │ │ └── swagger-ui.blade.php │ ├── routes │ │ └── api.php │ └── testbench.yaml ├── Metadata │ ├── ApiFilter.php │ ├── ApiProperty.php │ ├── ApiResource.php │ ├── CollectionOperationInterface.php │ ├── Delete.php │ ├── DeleteOperationInterface.php │ ├── Error.php │ ├── ErrorResource.php │ ├── ErrorResourceInterface.php │ ├── Exception │ │ ├── ErrorCodeSerializableInterface.php │ │ ├── ExceptionInterface.php │ │ ├── HttpExceptionInterface.php │ │ ├── InvalidArgumentException.php │ │ ├── InvalidIdentifierException.php │ │ ├── InvalidUriVariableException.php │ │ ├── ItemNotFoundException.php │ │ ├── NotExposedHttpException.php │ │ ├── OperationNotFoundException.php │ │ ├── ProblemExceptionInterface.php │ │ ├── PropertyNotFoundException.php │ │ ├── ResourceClassNotFoundException.php │ │ ├── RuntimeException.php │ │ ├── StatusAwareExceptionInterface.php │ │ └── UnsupportedMediaTypeHttpException.php │ ├── Extractor │ │ ├── AbstractPropertyExtractor.php │ │ ├── AbstractResourceExtractor.php │ │ ├── PhpFileResourceExtractor.php │ │ ├── PropertyExtractorInterface.php │ │ ├── ResourceExtractorInterface.php │ │ ├── ResourceExtractorTrait.php │ │ ├── XmlPropertyExtractor.php │ │ ├── XmlResourceExtractor.php │ │ ├── YamlPropertyExtractor.php │ │ ├── YamlResourceExtractor.php │ │ └── schema │ │ │ ├── properties.xsd │ │ │ └── resources.xsd │ ├── FilterInterface.php │ ├── Get.php │ ├── GetCollection.php │ ├── GraphQl │ │ ├── DeleteMutation.php │ │ ├── Mutation.php │ │ ├── Operation.php │ │ ├── Query.php │ │ ├── QueryCollection.php │ │ └── Subscription.php │ ├── HeaderParameter.php │ ├── HeaderParameterInterface.php │ ├── HttpOperation.php │ ├── IdentifiersExtractor.php │ ├── IdentifiersExtractorInterface.php │ ├── InflectorInterface.php │ ├── IriConverterInterface.php │ ├── IsApiResource.php │ ├── JsonSchemaFilterInterface.php │ ├── LICENSE │ ├── Link.php │ ├── Metadata.php │ ├── NotExposed.php │ ├── OpenApiParameterFilterInterface.php │ ├── Operation.php │ ├── Operation │ │ ├── DashPathSegmentNameGenerator.php │ │ ├── Factory │ │ │ ├── OperationMetadataFactory.php │ │ │ └── OperationMetadataFactoryInterface.php │ │ ├── PathSegmentNameGeneratorInterface.php │ │ └── UnderscorePathSegmentNameGenerator.php │ ├── Operations.php │ ├── Parameter.php │ ├── ParameterProviderFilterInterface.php │ ├── Parameters.php │ ├── Patch.php │ ├── Post.php │ ├── PropertiesAwareInterface.php │ ├── Property │ │ ├── Factory │ │ │ ├── AttributePropertyMetadataFactory.php │ │ │ ├── CachedPropertyMetadataFactory.php │ │ │ ├── CachedPropertyNameCollectionFactory.php │ │ │ ├── ClassLevelAttributePropertyNameCollectionFactory.php │ │ │ ├── ConcernsPropertyNameCollectionMetadataFactory.php │ │ │ ├── DefaultPropertyMetadataFactory.php │ │ │ ├── ExtractorPropertyMetadataFactory.php │ │ │ ├── ExtractorPropertyNameCollectionFactory.php │ │ │ ├── IdentifierPropertyMetadataFactory.php │ │ │ ├── PropertyInfoPropertyMetadataFactory.php │ │ │ ├── PropertyInfoPropertyNameCollectionFactory.php │ │ │ ├── PropertyMetadataFactoryInterface.php │ │ │ ├── PropertyNameCollectionFactoryInterface.php │ │ │ └── SerializerPropertyMetadataFactory.php │ │ └── PropertyNameCollection.php │ ├── Put.php │ ├── QueryParameter.php │ ├── QueryParameterInterface.php │ ├── README.md │ ├── Resource │ │ ├── Factory │ │ │ ├── AlternateUriResourceMetadataCollectionFactory.php │ │ │ ├── AttributesResourceMetadataCollectionFactory.php │ │ │ ├── AttributesResourceNameCollectionFactory.php │ │ │ ├── BackedEnumResourceMetadataCollectionFactory.php │ │ │ ├── CachedResourceMetadataCollectionFactory.php │ │ │ ├── CachedResourceNameCollectionFactory.php │ │ │ ├── ClassNameResourceNameCollectionFactory.php │ │ │ ├── ConcernsResourceMetadataCollectionFactory.php │ │ │ ├── ConcernsResourceNameCollectionFactory.php │ │ │ ├── ExtractorResourceMetadataCollectionFactory.php │ │ │ ├── ExtractorResourceNameCollectionFactory.php │ │ │ ├── FiltersResourceMetadataCollectionFactory.php │ │ │ ├── FormatsResourceMetadataCollectionFactory.php │ │ │ ├── InputOutputResourceMetadataCollectionFactory.php │ │ │ ├── LinkFactory.php │ │ │ ├── LinkFactoryInterface.php │ │ │ ├── LinkResourceMetadataCollectionFactory.php │ │ │ ├── MainControllerResourceMetadataCollectionFactory.php │ │ │ ├── MetadataCollectionFactoryTrait.php │ │ │ ├── NotExposedOperationResourceMetadataCollectionFactory.php │ │ │ ├── OperationDefaultsTrait.php │ │ │ ├── OperationNameResourceMetadataCollectionFactory.php │ │ │ ├── ParameterResourceMetadataCollectionFactory.php │ │ │ ├── PhpDocResourceMetadataCollectionFactory.php │ │ │ ├── PhpFileResourceMetadataCollectionFactory.php │ │ │ ├── PhpFileResourceNameCollectionFactory.php │ │ │ ├── PropertyLinkFactoryInterface.php │ │ │ ├── ResourceMetadataCollectionFactoryInterface.php │ │ │ ├── ResourceNameCollectionFactoryInterface.php │ │ │ └── UriTemplateResourceMetadataCollectionFactory.php │ │ ├── ResourceMetadataCollection.php │ │ └── ResourceNameCollection.php │ ├── ResourceAccessCheckerInterface.php │ ├── ResourceClassResolver.php │ ├── ResourceClassResolverInterface.php │ ├── UriVariableTransformer │ │ ├── DateTimeUriVariableTransformer.php │ │ └── IntegerUriVariableTransformer.php │ ├── UriVariableTransformerInterface.php │ ├── UriVariablesConverter.php │ ├── UriVariablesConverterInterface.php │ ├── UrlGeneratorInterface.php │ ├── Util │ │ ├── AttributeFilterExtractorTrait.php │ │ ├── AttributesExtractor.php │ │ ├── CachedTrait.php │ │ ├── CamelCaseToSnakeCaseNameConverter.php │ │ ├── ClassInfoTrait.php │ │ ├── CloneTrait.php │ │ ├── CompositeIdentifierParser.php │ │ ├── ContentNegotiationTrait.php │ │ ├── Inflector.php │ │ ├── IriHelper.php │ │ ├── PropertyInfoToTypeInfoHelper.php │ │ ├── Reflection.php │ │ ├── ReflectionClassRecursiveIterator.php │ │ ├── ResourceClassInfoTrait.php │ │ ├── SortTrait.php │ │ └── TypeHelper.php │ ├── WithResourceTrait.php │ └── composer.json ├── OpenApi │ ├── Attributes │ │ └── Webhook.php │ ├── Command │ │ └── OpenApiCommand.php │ ├── Factory │ │ ├── OpenApiFactory.php │ │ ├── OpenApiFactoryInterface.php │ │ └── TypeFactoryTrait.php │ ├── LICENSE │ ├── Model │ │ ├── Components.php │ │ ├── Contact.php │ │ ├── Encoding.php │ │ ├── Example.php │ │ ├── ExtensionTrait.php │ │ ├── ExternalDocumentation.php │ │ ├── Header.php │ │ ├── Info.php │ │ ├── License.php │ │ ├── Link.php │ │ ├── MediaType.php │ │ ├── OAuthFlow.php │ │ ├── OAuthFlows.php │ │ ├── Operation.php │ │ ├── Parameter.php │ │ ├── PathItem.php │ │ ├── Paths.php │ │ ├── Reference.php │ │ ├── RequestBody.php │ │ ├── Response.php │ │ ├── Schema.php │ │ ├── SecurityScheme.php │ │ ├── Server.php │ │ └── Tag.php │ ├── OpenApi.php │ ├── Options.php │ ├── README.md │ ├── Serializer │ │ ├── ApiGatewayNormalizer.php │ │ ├── LegacyOpenApiNormalizer.php │ │ ├── NormalizeOperationNameTrait.php │ │ ├── OpenApiNormalizer.php │ │ └── SerializerContextBuilder.php │ ├── State │ │ └── OpenApiProvider.php │ └── composer.json ├── Problem │ └── Serializer │ │ └── ConstraintViolationListNormalizer.php ├── RamseyUuid │ ├── LICENSE │ ├── README.md │ ├── Serializer │ │ └── UuidDenormalizer.php │ ├── UriVariableTransformer │ │ └── UuidUriVariableTransformer.php │ └── composer.json ├── Serializer │ ├── AbstractCollectionNormalizer.php │ ├── AbstractConstraintViolationListNormalizer.php │ ├── AbstractItemNormalizer.php │ ├── CacheKeyTrait.php │ ├── ConstraintViolationListNormalizer.php │ ├── ContextTrait.php │ ├── Filter │ │ ├── FilterInterface.php │ │ ├── GroupFilter.php │ │ └── PropertyFilter.php │ ├── InputOutputMetadataTrait.php │ ├── ItemNormalizer.php │ ├── JsonEncoder.php │ ├── LICENSE │ ├── Mapping │ │ ├── Factory │ │ │ └── ClassMetadataFactory.php │ │ └── Loader │ │ │ └── PropertyMetadataLoader.php │ ├── OperationContextTrait.php │ ├── Parameter │ │ └── SerializerFilterParameterProvider.php │ ├── README.md │ ├── SerializerContextBuilder.php │ ├── SerializerFilterContextBuilder.php │ ├── TagCollectorInterface.php │ ├── YamlEncoder.php │ └── composer.json ├── State │ ├── ApiResource │ │ └── Error.php │ ├── CallableProcessor.php │ ├── CallableProvider.php │ ├── CreateProvider.php │ ├── ErrorProvider.php │ ├── Exception │ │ ├── ParameterNotSupportedException.php │ │ └── ProviderNotFoundException.php │ ├── LICENSE │ ├── ObjectProvider.php │ ├── OptionsInterface.php │ ├── Pagination │ │ ├── ArrayPaginator.php │ │ ├── HasNextPagePaginatorInterface.php │ │ ├── Pagination.php │ │ ├── PaginationOptions.php │ │ ├── PaginatorInterface.php │ │ ├── PartialPaginatorInterface.php │ │ └── TraversablePaginator.php │ ├── ParameterNotFound.php │ ├── ParameterProviderInterface.php │ ├── Processor │ │ ├── AddLinkHeaderProcessor.php │ │ ├── RespondProcessor.php │ │ ├── SerializeProcessor.php │ │ └── WriteProcessor.php │ ├── ProcessorInterface.php │ ├── Provider │ │ ├── BackedEnumProvider.php │ │ ├── ContentNegotiationProvider.php │ │ ├── DeserializeProvider.php │ │ ├── ParameterProvider.php │ │ ├── ReadProvider.php │ │ └── SecurityParameterProvider.php │ ├── ProviderInterface.php │ ├── README.md │ ├── ResourceList.php │ ├── SerializerAwareProviderInterface.php │ ├── SerializerAwareProviderTrait.php │ ├── SerializerContextBuilderInterface.php │ ├── UriVariablesResolverTrait.php │ ├── Util │ │ ├── CorsTrait.php │ │ ├── OperationRequestInitiatorTrait.php │ │ ├── ParameterParserTrait.php │ │ ├── RequestAttributesExtractor.php │ │ ├── RequestParser.php │ │ └── StateOptionsTrait.php │ └── composer.json ├── Symfony │ ├── Action │ │ ├── DocumentationAction.php │ │ ├── EntrypointAction.php │ │ ├── NotExposedAction.php │ │ ├── NotFoundAction.php │ │ └── PlaceholderAction.php │ ├── Bundle │ │ ├── ApiPlatformBundle.php │ │ ├── ArgumentResolver │ │ │ ├── CompatibleValueResolverInterface.php │ │ │ └── PayloadArgumentResolver.php │ │ ├── CacheWarmer │ │ │ └── CachePoolClearerCacheWarmer.php │ │ ├── Command │ │ │ ├── DebugResourceCommand.php │ │ │ └── GraphQlExportCommand.php │ │ ├── DataCollector │ │ │ ├── DataCollected.php │ │ │ └── RequestDataCollector.php │ │ ├── DependencyInjection │ │ │ ├── ApiPlatformExtension.php │ │ │ ├── Compiler │ │ │ │ ├── AttributeFilterPass.php │ │ │ │ ├── AttributeResourcePass.php │ │ │ │ ├── AuthenticatorManagerPass.php │ │ │ │ ├── DataProviderPass.php │ │ │ │ ├── ElasticsearchClientPass.php │ │ │ │ ├── FilterPass.php │ │ │ │ ├── GraphQlMutationResolverPass.php │ │ │ │ ├── GraphQlQueryResolverPass.php │ │ │ │ ├── GraphQlResolverPass.php │ │ │ │ ├── GraphQlTypePass.php │ │ │ │ ├── MetadataAwareNameConverterPass.php │ │ │ │ ├── SerializerMappingLoaderPass.php │ │ │ │ ├── TestClientPass.php │ │ │ │ └── TestMercureHubPass.php │ │ │ └── Configuration.php │ │ ├── Resources │ │ │ ├── config │ │ │ │ ├── api.xml │ │ │ │ ├── argument_resolver.xml │ │ │ │ ├── data_collector.xml │ │ │ │ ├── debug.xml │ │ │ │ ├── doctrine_mongodb_odm.xml │ │ │ │ ├── doctrine_odm_mercure_publisher.xml │ │ │ │ ├── doctrine_orm.xml │ │ │ │ ├── doctrine_orm_http_cache_purger.xml │ │ │ │ ├── doctrine_orm_mercure_publisher.xml │ │ │ │ ├── elasticsearch.xml │ │ │ │ ├── filter.xml │ │ │ │ ├── graphql.xml │ │ │ │ ├── graphql │ │ │ │ │ ├── security.xml │ │ │ │ │ └── validator.xml │ │ │ │ ├── graphql_mercure.xml │ │ │ │ ├── hal.xml │ │ │ │ ├── http_cache.xml │ │ │ │ ├── http_cache_purger.xml │ │ │ │ ├── hydra.xml │ │ │ │ ├── json_schema.xml │ │ │ │ ├── jsonapi.xml │ │ │ │ ├── jsonld.xml │ │ │ │ ├── link_security.xml │ │ │ │ ├── maker.xml │ │ │ │ ├── messenger.xml │ │ │ │ ├── metadata │ │ │ │ │ ├── links.xml │ │ │ │ │ ├── operation.xml │ │ │ │ │ ├── php.xml │ │ │ │ │ ├── php_doc.xml │ │ │ │ │ ├── property.xml │ │ │ │ │ ├── property_name.xml │ │ │ │ │ ├── resource.xml │ │ │ │ │ ├── resource_name.xml │ │ │ │ │ ├── validator.xml │ │ │ │ │ ├── xml.xml │ │ │ │ │ └── yaml.xml │ │ │ │ ├── openapi.xml │ │ │ │ ├── openapi │ │ │ │ │ └── yaml.xml │ │ │ │ ├── problem.xml │ │ │ │ ├── ramsey_uuid.xml │ │ │ │ ├── routing │ │ │ │ │ ├── api.xml │ │ │ │ │ ├── docs.xml │ │ │ │ │ ├── errors.xml │ │ │ │ │ ├── genid.xml │ │ │ │ │ ├── graphql │ │ │ │ │ │ ├── graphiql.xml │ │ │ │ │ │ ├── graphql.xml │ │ │ │ │ │ └── graphql_playground.xml │ │ │ │ │ └── jsonld.xml │ │ │ │ ├── security.xml │ │ │ │ ├── state │ │ │ │ │ ├── http_cache_purger.xml │ │ │ │ │ ├── hydra.xml │ │ │ │ │ ├── jsonapi.xml │ │ │ │ │ ├── jsonld.xml │ │ │ │ │ ├── mercure.xml │ │ │ │ │ ├── processor.xml │ │ │ │ │ ├── provider.xml │ │ │ │ │ ├── security.xml │ │ │ │ │ ├── security_validator.xml │ │ │ │ │ ├── state.xml │ │ │ │ │ └── swagger_ui.xml │ │ │ │ ├── swagger_ui.xml │ │ │ │ ├── symfony │ │ │ │ │ ├── controller.xml │ │ │ │ │ ├── events.xml │ │ │ │ │ ├── jsonld.xml │ │ │ │ │ ├── swagger_ui.xml │ │ │ │ │ ├── symfony.xml │ │ │ │ │ └── uid.xml │ │ │ │ └── validator │ │ │ │ │ ├── events.xml │ │ │ │ │ ├── state.xml │ │ │ │ │ └── validator.xml │ │ │ ├── public │ │ │ │ ├── es6-promise │ │ │ │ │ └── es6-promise.auto.min.js │ │ │ │ ├── fetch │ │ │ │ │ └── fetch.js │ │ │ │ ├── fonts │ │ │ │ │ └── open-sans │ │ │ │ │ │ ├── 400.css │ │ │ │ │ │ ├── 700.css │ │ │ │ │ │ └── files │ │ │ │ │ │ ├── open-sans-cyrillic-400-normal.woff │ │ │ │ │ │ ├── open-sans-cyrillic-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-cyrillic-700-normal.woff │ │ │ │ │ │ ├── open-sans-cyrillic-700-normal.woff2 │ │ │ │ │ │ ├── open-sans-cyrillic-ext-400-normal.woff │ │ │ │ │ │ ├── open-sans-cyrillic-ext-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-cyrillic-ext-700-normal.woff │ │ │ │ │ │ ├── open-sans-cyrillic-ext-700-normal.woff2 │ │ │ │ │ │ ├── open-sans-greek-400-normal.woff │ │ │ │ │ │ ├── open-sans-greek-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-greek-700-normal.woff │ │ │ │ │ │ ├── open-sans-greek-700-normal.woff2 │ │ │ │ │ │ ├── open-sans-greek-ext-400-normal.woff │ │ │ │ │ │ ├── open-sans-greek-ext-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-greek-ext-700-normal.woff │ │ │ │ │ │ ├── open-sans-greek-ext-700-normal.woff2 │ │ │ │ │ │ ├── open-sans-hebrew-400-normal.woff │ │ │ │ │ │ ├── open-sans-hebrew-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-hebrew-700-normal.woff │ │ │ │ │ │ ├── open-sans-hebrew-700-normal.woff2 │ │ │ │ │ │ ├── open-sans-latin-400-normal.woff │ │ │ │ │ │ ├── open-sans-latin-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-latin-700-normal.woff │ │ │ │ │ │ ├── open-sans-latin-700-normal.woff2 │ │ │ │ │ │ ├── open-sans-latin-ext-400-normal.woff │ │ │ │ │ │ ├── open-sans-latin-ext-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-latin-ext-700-normal.woff │ │ │ │ │ │ ├── open-sans-latin-ext-700-normal.woff2 │ │ │ │ │ │ ├── open-sans-math-400-normal.woff │ │ │ │ │ │ ├── open-sans-math-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-math-700-normal.woff │ │ │ │ │ │ ├── open-sans-math-700-normal.woff2 │ │ │ │ │ │ ├── open-sans-symbols-400-normal.woff │ │ │ │ │ │ ├── open-sans-symbols-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-symbols-700-normal.woff │ │ │ │ │ │ ├── open-sans-symbols-700-normal.woff2 │ │ │ │ │ │ ├── open-sans-vietnamese-400-normal.woff │ │ │ │ │ │ ├── open-sans-vietnamese-400-normal.woff2 │ │ │ │ │ │ ├── open-sans-vietnamese-700-normal.woff │ │ │ │ │ │ └── open-sans-vietnamese-700-normal.woff2 │ │ │ │ ├── graphiql-style.css │ │ │ │ ├── graphiql │ │ │ │ │ ├── graphiql.css │ │ │ │ │ └── graphiql.min.js │ │ │ │ ├── graphql-playground-style.css │ │ │ │ ├── graphql-playground │ │ │ │ │ ├── index.css │ │ │ │ │ └── middleware.js │ │ │ │ ├── init-common-ui.js │ │ │ │ ├── init-graphiql.js │ │ │ │ ├── init-graphql-playground.js │ │ │ │ ├── init-redoc-ui.js │ │ │ │ ├── init-swagger-ui.js │ │ │ │ ├── logo-header.svg │ │ │ │ ├── react │ │ │ │ │ ├── react-dom.production.min.js │ │ │ │ │ └── react.production.min.js │ │ │ │ ├── redoc │ │ │ │ │ └── redoc.standalone.js │ │ │ │ ├── style.css │ │ │ │ ├── swagger-ui │ │ │ │ │ ├── oauth2-redirect.html │ │ │ │ │ ├── swagger-ui-bundle.js │ │ │ │ │ ├── swagger-ui-standalone-preset.js │ │ │ │ │ ├── swagger-ui.css │ │ │ │ │ └── swagger-ui.css.map │ │ │ │ ├── web.png │ │ │ │ └── webby.png │ │ │ └── views │ │ │ │ ├── DataCollector │ │ │ │ ├── api-platform-icon.svg │ │ │ │ ├── api-platform.svg │ │ │ │ └── request.html.twig │ │ │ │ ├── GraphQlPlayground │ │ │ │ └── index.html.twig │ │ │ │ ├── Graphiql │ │ │ │ └── index.html.twig │ │ │ │ └── SwaggerUi │ │ │ │ └── index.html.twig │ │ ├── SwaggerUi │ │ │ ├── SwaggerUiAction.php │ │ │ ├── SwaggerUiContext.php │ │ │ ├── SwaggerUiProcessor.php │ │ │ └── SwaggerUiProvider.php │ │ └── Test │ │ │ ├── ApiTestAssertionsTrait.php │ │ │ ├── ApiTestCase.php │ │ │ ├── Client.php │ │ │ ├── ClientTrait.php │ │ │ ├── Constraint │ │ │ ├── ArraySubset.php │ │ │ ├── ArraySubsetTrait.php │ │ │ └── MatchesJsonSchema.php │ │ │ └── Response.php │ ├── Controller │ │ └── MainController.php │ ├── Doctrine │ │ └── EventListener │ │ │ ├── PublishMercureUpdatesListener.php │ │ │ └── PurgeHttpCacheListener.php │ ├── EventListener │ │ ├── AddFormatListener.php │ │ ├── DeserializeListener.php │ │ ├── ErrorListener.php │ │ ├── EventPriorities.php │ │ ├── ExceptionListener.php │ │ ├── JsonApi │ │ │ ├── TransformFieldsetsParametersListener.php │ │ │ ├── TransformFilteringParametersListener.php │ │ │ ├── TransformPaginationParametersListener.php │ │ │ └── TransformSortingParametersListener.php │ │ ├── ReadListener.php │ │ ├── RespondListener.php │ │ ├── SerializeListener.php │ │ ├── ValidateListener.php │ │ └── WriteListener.php │ ├── GraphQl │ │ └── Resolver │ │ │ └── Factory │ │ │ └── DataCollectorResolverFactory.php │ ├── LICENSE │ ├── Maker │ │ ├── MakeStateProcessor.php │ │ ├── MakeStateProvider.php │ │ └── Resources │ │ │ ├── help │ │ │ ├── MakeStateProcessor.txt │ │ │ └── MakeStateProvider.txt │ │ │ └── skeleton │ │ │ ├── StateProcessor.php.tpl │ │ │ └── StateProvider.php.tpl │ ├── Messenger │ │ ├── ContextStamp.php │ │ ├── DispatchTrait.php │ │ ├── Metadata │ │ │ └── MessengerResourceMetadataCollectionFactory.php │ │ ├── Processor.php │ │ └── RemoveStamp.php │ ├── README.md │ ├── Routing │ │ ├── ApiLoader.php │ │ ├── IriConverter.php │ │ ├── Router.php │ │ └── SkolemIriConverter.php │ ├── Security │ │ ├── Core │ │ │ └── Authorization │ │ │ │ └── ExpressionLanguageProvider.php │ │ ├── Exception │ │ │ └── AccessDeniedException.php │ │ ├── ResourceAccessChecker.php │ │ ├── ResourceAccessCheckerInterface.php │ │ └── State │ │ │ ├── AccessCheckerProvider.php │ │ │ ├── LinkAccessCheckerProvider.php │ │ │ └── LinkedReadProvider.php │ ├── State │ │ └── MercureLinkProcessor.php │ ├── UriVariableTransformer │ │ ├── UlidUriVariableTransformer.php │ │ └── UuidUriVariableTransformer.php │ ├── Util │ │ ├── FormatMatcher.php │ │ └── RequestAttributesExtractor.php │ ├── Validator │ │ ├── Metadata │ │ │ └── Property │ │ │ │ ├── Restriction │ │ │ │ ├── PropertySchemaChoiceRestriction.php │ │ │ │ ├── PropertySchemaCollectionRestriction.php │ │ │ │ ├── PropertySchemaCountRestriction.php │ │ │ │ ├── PropertySchemaFormat.php │ │ │ │ ├── PropertySchemaGreaterThanOrEqualRestriction.php │ │ │ │ ├── PropertySchemaGreaterThanRestriction.php │ │ │ │ ├── PropertySchemaLengthRestriction.php │ │ │ │ ├── PropertySchemaLessThanOrEqualRestriction.php │ │ │ │ ├── PropertySchemaLessThanRestriction.php │ │ │ │ ├── PropertySchemaOneOfRestriction.php │ │ │ │ ├── PropertySchemaRangeRestriction.php │ │ │ │ ├── PropertySchemaRegexRestriction.php │ │ │ │ ├── PropertySchemaRestrictionMetadataInterface.php │ │ │ │ └── PropertySchemaUniqueRestriction.php │ │ │ │ └── ValidatorPropertyMetadataFactory.php │ │ ├── Serializer │ │ │ └── ValidationExceptionNormalizer.php │ │ ├── State │ │ │ ├── ErrorProvider.php │ │ │ ├── ParameterValidatorProvider.php │ │ │ └── ValidateProvider.php │ │ ├── ValidationGroupsGeneratorInterface.php │ │ └── Validator.php │ └── composer.json └── Validator │ ├── Exception │ ├── ConstraintViolationListAwareExceptionInterface.php │ └── ValidationException.php │ ├── LICENSE │ ├── Metadata │ └── Resource │ │ └── Factory │ │ └── ParameterValidationResourceMetadataCollectionFactory.php │ ├── README.md │ ├── ValidatorInterface.php │ └── composer.json └── update-hydra-context.php /codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "src/**/Tests/" 3 | -------------------------------------------------------------------------------- /phpunit.baseline.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /pmu.baseline: -------------------------------------------------------------------------------- 1 | Class "ApiPlatform\Serializer\SerializerContextBuilder" uses "ApiPlatform\Doctrine\Orm\State\Options" but it is not declared as dependency. 2 | -------------------------------------------------------------------------------- /src/ApiResource/Error.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\ApiResource; 15 | 16 | use ApiPlatform\State\ApiResource\Error as ApiResourceError; 17 | 18 | class Error extends ApiResourceError 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /src/Doctrine/Common/Filter/ExistsFilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Common\Filter; 15 | 16 | /** 17 | * Interface for filtering the collection by whether a property value exists or not. 18 | * 19 | * @author Teoh Han Hui 20 | * @author Alan Poulain 21 | */ 22 | interface ExistsFilterInterface 23 | { 24 | public const QUERY_PARAMETER_KEY = 'exists'; 25 | } 26 | -------------------------------------------------------------------------------- /src/Doctrine/Common/Filter/ManagerRegistryAwareInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Common\Filter; 15 | 16 | use Doctrine\Persistence\ManagerRegistry; 17 | 18 | interface ManagerRegistryAwareInterface 19 | { 20 | public function hasManagerRegistry(): bool; 21 | 22 | public function getManagerRegistry(): ManagerRegistry; 23 | 24 | public function setManagerRegistry(ManagerRegistry $managerRegistry): void; 25 | } 26 | -------------------------------------------------------------------------------- /src/Doctrine/Common/Filter/PropertyAwareFilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Common\Filter; 15 | 16 | /** 17 | * @author Antoine Bluchet 18 | * 19 | * @experimental 20 | */ 21 | interface PropertyAwareFilterInterface 22 | { 23 | /** 24 | * @param string[] $properties 25 | */ 26 | public function setProperties(array $properties): void; 27 | } 28 | -------------------------------------------------------------------------------- /src/Doctrine/Common/Filter/RangeFilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Common\Filter; 15 | 16 | /** 17 | * Interface for filtering the collection by range. 18 | * 19 | * @author Lee Siong Chan 20 | * @author Alan Poulain 21 | */ 22 | interface RangeFilterInterface 23 | { 24 | public const PARAMETER_BETWEEN = 'between'; 25 | public const PARAMETER_GREATER_THAN = 'gt'; 26 | public const PARAMETER_GREATER_THAN_OR_EQUAL = 'gte'; 27 | public const PARAMETER_LESS_THAN = 'lt'; 28 | public const PARAMETER_LESS_THAN_OR_EQUAL = 'lte'; 29 | } 30 | -------------------------------------------------------------------------------- /src/Doctrine/Common/ParameterValueExtractorTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Common; 15 | 16 | use ApiPlatform\Metadata\Parameter; 17 | 18 | trait ParameterValueExtractorTrait 19 | { 20 | /** 21 | * @return array 22 | */ 23 | private function extractParameterValue(Parameter $parameter, mixed $value): array 24 | { 25 | $key = $parameter->getProperty() ?? $parameter->getKey(); 26 | if (!str_contains($key, ':property')) { 27 | return [$key => $value]; 28 | } 29 | 30 | return [str_replace('[:property]', '', $key) => $value]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Doctrine/Common/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Doctrine Common Support 2 | 3 | Integration for [Doctrine](https://www.doctrine-project.org) with the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/core/getting-started/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/Doctrine/Common/State/Options.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Common\State; 15 | 16 | use ApiPlatform\State\OptionsInterface; 17 | 18 | class Options implements OptionsInterface 19 | { 20 | /** 21 | * @param mixed $handleLinks experimental callable, typed mixed as we may want a service name in the future 22 | */ 23 | public function __construct( 24 | protected mixed $handleLinks = null, 25 | ) { 26 | } 27 | 28 | public function getHandleLinks(): mixed 29 | { 30 | return $this->handleLinks; 31 | } 32 | 33 | public function withHandleLinks(mixed $handleLinks): self 34 | { 35 | $self = clone $this; 36 | $self->handleLinks = $handleLinks; 37 | 38 | return $self; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Odm\Extension; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use Doctrine\ODM\MongoDB\Aggregation\Builder; 18 | 19 | /** 20 | * Interface of Doctrine MongoDB ODM aggregation extensions for collection aggregations. 21 | * 22 | * @author Alan Poulain 23 | */ 24 | interface AggregationCollectionExtensionInterface 25 | { 26 | public function applyToCollection(Builder $aggregationBuilder, string $resourceClass, ?Operation $operation = null, array &$context = []): void; 27 | } 28 | -------------------------------------------------------------------------------- /src/Doctrine/Odm/Extension/AggregationItemExtensionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Odm\Extension; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use Doctrine\ODM\MongoDB\Aggregation\Builder; 18 | 19 | /** 20 | * Interface of Doctrine MongoDB ODM aggregation extensions for item aggregations. 21 | * 22 | * @author Alan Poulain 23 | */ 24 | interface AggregationItemExtensionInterface 25 | { 26 | public function applyToItem(Builder $aggregationBuilder, string $resourceClass, array $identifiers, ?Operation $operation = null, array &$context = []): void; 27 | } 28 | -------------------------------------------------------------------------------- /src/Doctrine/Odm/Extension/AggregationResultItemExtensionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Odm\Extension; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use Doctrine\ODM\MongoDB\Aggregation\Builder; 18 | 19 | /** 20 | * Interface of Doctrine MongoDB ODM aggregation extensions that supports result production 21 | * for specific cases such as Aggregation alteration. 22 | * 23 | * @author Alan Poulain 24 | */ 25 | interface AggregationResultItemExtensionInterface extends AggregationItemExtensionInterface 26 | { 27 | public function supportsResult(string $resourceClass, ?Operation $operation = null, array $context = []): bool; 28 | 29 | public function getResult(Builder $aggregationBuilder, string $resourceClass, ?Operation $operation = null, array $context = []): ?object; 30 | } 31 | -------------------------------------------------------------------------------- /src/Doctrine/Odm/Filter/FilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Odm\Filter; 15 | 16 | use ApiPlatform\Metadata\FilterInterface as BaseFilterInterface; 17 | use ApiPlatform\Metadata\Operation; 18 | use Doctrine\ODM\MongoDB\Aggregation\Builder; 19 | 20 | /** 21 | * Doctrine MongoDB ODM filter interface. 22 | * 23 | * @author Alan Poulain 24 | */ 25 | interface FilterInterface extends BaseFilterInterface 26 | { 27 | /** 28 | * Applies the filter. 29 | */ 30 | public function apply(Builder $aggregationBuilder, string $resourceClass, ?Operation $operation = null, array &$context = []): void; 31 | } 32 | -------------------------------------------------------------------------------- /src/Doctrine/Odm/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Doctrine MongoDB ODM Support 2 | 3 | Integration for [Doctrine MongoDB ODM](https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/current/index.html) with the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/core/mongodb/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/Doctrine/Odm/State/LinksHandlerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Odm\State; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use Doctrine\ODM\MongoDB\Aggregation\Builder; 18 | 19 | /** 20 | * @experimental 21 | */ 22 | interface LinksHandlerInterface 23 | { 24 | /** 25 | * Handle Doctrine ORM links. 26 | * 27 | * @see LinksHandlerTrait 28 | * 29 | * @param array $uriVariables 30 | * @param array{documentClass: string, operation: Operation}&array $context 31 | */ 32 | public function handleLinks(Builder $aggregationBuilder, array $uriVariables, array $context): void; 33 | } 34 | -------------------------------------------------------------------------------- /src/Doctrine/Orm/Extension/DoctrinePaginatorFactory.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Orm\Extension; 15 | 16 | use Doctrine\ORM\Tools\Pagination\Paginator; 17 | 18 | class DoctrinePaginatorFactory 19 | { 20 | public function getPaginator($query, $fetchJoinCollection): Paginator 21 | { 22 | return new Paginator($query, $fetchJoinCollection); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Doctrine/Orm/Extension/QueryResultItemExtensionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Orm\Extension; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use Doctrine\ORM\QueryBuilder; 18 | 19 | /** 20 | * Interface of Doctrine ORM query extensions that supports result production 21 | * for specific cases such as Query alteration. 22 | * 23 | * @author Antoine BLUCHET 24 | * 25 | * @template T of object 26 | */ 27 | interface QueryResultItemExtensionInterface extends QueryItemExtensionInterface 28 | { 29 | public function supportsResult(string $resourceClass, ?Operation $operation = null, array $context = []): bool; 30 | 31 | public function getResult(QueryBuilder $queryBuilder, ?string $resourceClass = null, ?Operation $operation = null, array $context = []): ?object; 32 | } 33 | -------------------------------------------------------------------------------- /src/Doctrine/Orm/Filter/FilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Orm\Filter; 15 | 16 | use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface; 17 | use ApiPlatform\Metadata\FilterInterface as BaseFilterInterface; 18 | use ApiPlatform\Metadata\Operation; 19 | use Doctrine\ORM\QueryBuilder; 20 | 21 | /** 22 | * Doctrine ORM filter interface. 23 | * 24 | * @author Kévin Dunglas 25 | */ 26 | interface FilterInterface extends BaseFilterInterface 27 | { 28 | /** 29 | * Applies the filter. 30 | */ 31 | public function apply(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void; 32 | } 33 | -------------------------------------------------------------------------------- /src/Doctrine/Orm/QueryAwareInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Orm; 15 | 16 | use Doctrine\ORM\Query; 17 | 18 | interface QueryAwareInterface 19 | { 20 | /** 21 | * Gets the Query object that will actually be executed. 22 | * 23 | * This should allow configuring options which could only be set on the Query 24 | * object itself. 25 | */ 26 | public function getQuery(): Query; 27 | } 28 | -------------------------------------------------------------------------------- /src/Doctrine/Orm/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Doctrine ORM Support 2 | 3 | Integration for [Doctrine ORM](https://www.doctrine-project.org/projects/doctrine-orm/en/current/index.html) with the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/core/getting-started/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/Doctrine/Orm/State/LinksHandlerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Orm\State; 15 | 16 | use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface; 17 | use ApiPlatform\Metadata\Operation; 18 | use Doctrine\ORM\QueryBuilder; 19 | 20 | /** 21 | * @experimental 22 | */ 23 | interface LinksHandlerInterface 24 | { 25 | /** 26 | * Handle Doctrine ORM links. 27 | * 28 | * @see LinksHandlerTrait 29 | * 30 | * @param array $uriVariables 31 | * @param array{entityClass: string, operation: Operation}&array $context 32 | */ 33 | public function handleLinks(QueryBuilder $queryBuilder, array $uriVariables, QueryNameGeneratorInterface $queryNameGenerator, array $context): void; 34 | } 35 | -------------------------------------------------------------------------------- /src/Doctrine/Orm/Util/QueryNameGeneratorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Doctrine\Orm\Util; 15 | 16 | /** 17 | * @author Amrouche Hamza 18 | */ 19 | interface QueryNameGeneratorInterface 20 | { 21 | /** 22 | * Generates a cacheable alias for DQL join. 23 | */ 24 | public function generateJoinAlias(string $association): string; 25 | 26 | /** 27 | * Generates a cacheable parameter name for DQL query. 28 | */ 29 | public function generateParameterName(string $name): string; 30 | } 31 | -------------------------------------------------------------------------------- /src/Documentation/DocumentationInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Documentation; 15 | 16 | /** 17 | * An API documentation. 18 | */ 19 | interface DocumentationInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/Documentation/Entrypoint.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Documentation; 15 | 16 | use ApiPlatform\Metadata\Resource\ResourceNameCollection; 17 | 18 | /** 19 | * The first path you will see in the API. 20 | * 21 | * @author Amrouche Hamza 22 | */ 23 | final class Entrypoint 24 | { 25 | public function __construct(private readonly ResourceNameCollection $resourceNameCollection) 26 | { 27 | } 28 | 29 | public function getResourceNameCollection(): ResourceNameCollection 30 | { 31 | return $this->resourceNameCollection; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Documentation/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Documentation 2 | 3 | The API documentation component of the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/core/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/Elasticsearch/Exception/ExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Elasticsearch\Exception; 15 | 16 | /** 17 | * Base exception interface. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | interface ExceptionInterface extends \Throwable 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Elasticsearch/Exception/IndexNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Elasticsearch\Exception; 15 | 16 | /** 17 | * Index not found exception. 18 | * 19 | * @experimental 20 | * 21 | * @author Baptiste Meyer 22 | */ 23 | final class IndexNotFoundException extends \Exception implements ExceptionInterface 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /src/Elasticsearch/Exception/NonUniqueIdentifierException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Elasticsearch\Exception; 15 | 16 | /** 17 | * Non unique identifier exception. 18 | * 19 | * @experimental 20 | * 21 | * @author Baptiste Meyer 22 | */ 23 | final class NonUniqueIdentifierException extends \Exception implements ExceptionInterface 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /src/Elasticsearch/Extension/RequestBodySearchCollectionExtensionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Elasticsearch\Extension; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | 18 | /** 19 | * Interface of Elasticsearch request body search extensions for collection queries. 20 | * 21 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html 22 | * 23 | * @experimental 24 | * 25 | * @author Baptiste Meyer 26 | */ 27 | interface RequestBodySearchCollectionExtensionInterface 28 | { 29 | public function applyToCollection(array $requestBody, string $resourceClass, ?Operation $operation = null, array $context = []): array; 30 | } 31 | -------------------------------------------------------------------------------- /src/Elasticsearch/Filter/ConstantScoreFilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Elasticsearch\Filter; 15 | 16 | /** 17 | * Elasticsearch filter interface for a constant score query. 18 | * 19 | * @experimental 20 | * 21 | * @author Baptiste Meyer 22 | */ 23 | interface ConstantScoreFilterInterface extends FilterInterface 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /src/Elasticsearch/Filter/FilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Elasticsearch\Filter; 15 | 16 | use ApiPlatform\Metadata\FilterInterface as BaseFilterInterface; 17 | use ApiPlatform\Metadata\Operation; 18 | 19 | /** 20 | * Elasticsearch filter interface. 21 | * 22 | * @experimental 23 | * 24 | * @author Baptiste Meyer 25 | */ 26 | interface FilterInterface extends BaseFilterInterface 27 | { 28 | public function apply(array $clauseBody, string $resourceClass, ?Operation $operation = null, array $context = []): array; 29 | } 30 | -------------------------------------------------------------------------------- /src/Elasticsearch/Filter/SortFilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Elasticsearch\Filter; 15 | 16 | /** 17 | * Elasticsearch filter interface for sorting. 18 | * 19 | * @experimental 20 | * 21 | * @author Baptiste Meyer 22 | */ 23 | interface SortFilterInterface extends FilterInterface 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /src/Elasticsearch/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Elasticsearch Support 2 | 3 | Integration for [Elasticsearch](https://www.elastic.co/elasticsearch) with the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/core/elasticsearch/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/GraphQl/Error/ErrorHandler.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Error; 15 | 16 | /** 17 | * Handles the errors thrown by the GraphQL library by applying the formatter to them (default behavior). 18 | * 19 | * @author Ollie Harridge 20 | */ 21 | final class ErrorHandler implements ErrorHandlerInterface 22 | { 23 | /** 24 | * {@inheritdoc} 25 | */ 26 | public function __invoke(array $errors, callable $formatter): array 27 | { 28 | return array_map($formatter, $errors); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/GraphQl/Error/ErrorHandlerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Error; 15 | 16 | use GraphQL\Error\Error; 17 | 18 | /** 19 | * Handles the errors thrown by the GraphQL library. 20 | * It is responsible for applying the formatter to the errors and can be used for filtering or logging them. 21 | * 22 | * @author Ollie Harridge 23 | */ 24 | interface ErrorHandlerInterface 25 | { 26 | /** 27 | * @param Error[] $errors 28 | */ 29 | public function __invoke(array $errors, callable $formatter): array; 30 | } 31 | -------------------------------------------------------------------------------- /src/GraphQl/Exception/InvalidTypeException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Exception; 15 | 16 | final class InvalidTypeException extends \RuntimeException 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/GraphQl/ExecutorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl; 15 | 16 | use GraphQL\Executor\ExecutionResult; 17 | use GraphQL\Type\Schema; 18 | 19 | /** 20 | * Wrapper for the GraphQL facade. 21 | * 22 | * @author Alan Poulain 23 | */ 24 | interface ExecutorInterface 25 | { 26 | /** 27 | * @see http://webonyx.github.io/graphql-php/executing-queries/#using-facade-method 28 | */ 29 | public function executeQuery(Schema $schema, $source, mixed $rootValue = null, mixed $context = null, ?array $variableValues = null, ?string $operationName = null, ?callable $fieldResolver = null, ?array $validationRules = null): ExecutionResult; 30 | } 31 | -------------------------------------------------------------------------------- /src/GraphQl/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - GraphQL 2 | 3 | The [GraphQL](https://graphql.org/) component of the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/core/graphql/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/GraphQl/Resolver/Factory/ResolverFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Resolver\Factory; 15 | 16 | use ApiPlatform\Metadata\GraphQl\Operation; 17 | use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface; 18 | 19 | /** 20 | * Builds a GraphQL resolver. 21 | * 22 | * @author Kévin Dunglas 23 | */ 24 | interface ResolverFactoryInterface 25 | { 26 | public function __invoke(?string $resourceClass = null, ?string $rootClass = null, ?Operation $operation = null, ?PropertyMetadataFactoryInterface $propertyMetadataFactory = null): callable; 27 | } 28 | -------------------------------------------------------------------------------- /src/GraphQl/Resolver/MutationResolverInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Resolver; 15 | 16 | /** 17 | * A function resolving a GraphQL mutation. 18 | * 19 | * @author Raoul Clais 20 | */ 21 | interface MutationResolverInterface 22 | { 23 | public function __invoke(?object $item, array $context): ?object; 24 | } 25 | -------------------------------------------------------------------------------- /src/GraphQl/Resolver/QueryCollectionResolverInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Resolver; 15 | 16 | /** 17 | * A function resolving a GraphQL query of a collection. 18 | * 19 | * @author Alan Poulain 20 | */ 21 | interface QueryCollectionResolverInterface 22 | { 23 | /** 24 | * @param iterable $collection 25 | * 26 | * @return iterable 27 | */ 28 | public function __invoke(iterable $collection, array $context): iterable; 29 | } 30 | -------------------------------------------------------------------------------- /src/GraphQl/Resolver/QueryItemResolverInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Resolver; 15 | 16 | /** 17 | * A function resolving a GraphQL query of an item. 18 | * 19 | * @author Lukas Lücke 20 | */ 21 | interface QueryItemResolverInterface 22 | { 23 | public function __invoke(?object $item, array $context): object; 24 | } 25 | -------------------------------------------------------------------------------- /src/GraphQl/Serializer/SerializerContextBuilderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Serializer; 15 | 16 | use ApiPlatform\Metadata\GraphQl\Operation; 17 | 18 | /** 19 | * Builds the context used by the Symfony Serializer. 20 | * 21 | * @author Alan Poulain 22 | */ 23 | interface SerializerContextBuilderInterface 24 | { 25 | public function create(string $resourceClass, Operation $operation, array $resolverContext, bool $normalization): array; 26 | } 27 | -------------------------------------------------------------------------------- /src/GraphQl/State/Provider/NoopProvider.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\State\Provider; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use ApiPlatform\State\ProviderInterface; 18 | 19 | /** 20 | * No-op Provider for GraphQl. 21 | */ 22 | final class NoopProvider implements ProviderInterface 23 | { 24 | public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null 25 | { 26 | return null; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/GraphQl/Subscription/MercureSubscriptionIriGeneratorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Subscription; 15 | 16 | /** 17 | * Generates Mercure-related IRIs from a subscription ID. 18 | * 19 | * @author Alan Poulain 20 | */ 21 | interface MercureSubscriptionIriGeneratorInterface 22 | { 23 | public function generateTopicIri(string $subscriptionId): string; 24 | 25 | public function generateMercureUrl(string $subscriptionId, ?string $hub = null): string; 26 | } 27 | -------------------------------------------------------------------------------- /src/GraphQl/Subscription/OperationAwareSubscriptionManagerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Subscription; 15 | 16 | use ApiPlatform\Metadata\GraphQl\Operation; 17 | 18 | /** 19 | * Manages all the queried subscriptions and creates their ID. 20 | * 21 | * @author Alan Poulain 22 | */ 23 | interface OperationAwareSubscriptionManagerInterface extends SubscriptionManagerInterface 24 | { 25 | public function retrieveSubscriptionId(array $context, ?array $result, ?Operation $operation = null): ?string; 26 | } 27 | -------------------------------------------------------------------------------- /src/GraphQl/Subscription/SubscriptionIdentifierGenerator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Subscription; 15 | 16 | /** 17 | * Generates an identifier used to identify a subscription. 18 | * 19 | * @author Alan Poulain 20 | */ 21 | final class SubscriptionIdentifierGenerator implements SubscriptionIdentifierGeneratorInterface 22 | { 23 | public function generateSubscriptionIdentifier(array $fields): string 24 | { 25 | unset($fields['mercureUrl'], $fields['clientSubscriptionId']); 26 | 27 | return hash('sha256', print_r($fields, true)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/GraphQl/Subscription/SubscriptionIdentifierGeneratorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Subscription; 15 | 16 | /** 17 | * Generates an identifier used to identify a subscription. 18 | * 19 | * @author Alan Poulain 20 | */ 21 | interface SubscriptionIdentifierGeneratorInterface 22 | { 23 | public function generateSubscriptionIdentifier(array $fields): string; 24 | } 25 | -------------------------------------------------------------------------------- /src/GraphQl/Subscription/SubscriptionManagerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Subscription; 15 | 16 | /** 17 | * Manages all the queried subscriptions and creates their ID. 18 | * 19 | * @author Alan Poulain 20 | */ 21 | interface SubscriptionManagerInterface 22 | { 23 | public function retrieveSubscriptionId(array $context, ?array $result): ?string; 24 | 25 | public function getPushPayloads(object $object): array; 26 | } 27 | -------------------------------------------------------------------------------- /src/GraphQl/Type/Definition/TypeInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Type\Definition; 15 | 16 | /** 17 | * @author Alan Poulain 18 | */ 19 | interface TypeInterface 20 | { 21 | public function getName(): string; 22 | } 23 | -------------------------------------------------------------------------------- /src/GraphQl/Type/SchemaBuilderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Type; 15 | 16 | use GraphQL\Type\Schema; 17 | 18 | /** 19 | * Builds a GraphQL schema. 20 | * 21 | * @author Alan Poulain 22 | */ 23 | interface SchemaBuilderInterface 24 | { 25 | public function getSchema(): Schema; 26 | } 27 | -------------------------------------------------------------------------------- /src/GraphQl/Type/TypeNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Type; 15 | 16 | use Psr\Container\NotFoundExceptionInterface; 17 | 18 | /** 19 | * Exception thrown when a type has not been found in the types container. 20 | * 21 | * @author Alan Poulain 22 | */ 23 | final class TypeNotFoundException extends \InvalidArgumentException implements NotFoundExceptionInterface 24 | { 25 | public function __construct(string $message, private readonly string $typeId) 26 | { 27 | parent::__construct($message); 28 | } 29 | 30 | /** 31 | * Returns the type identifier causing this exception. 32 | */ 33 | public function getTypeId(): string 34 | { 35 | return $this->typeId; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/GraphQl/Type/TypesFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Type; 15 | 16 | /** 17 | * Get the GraphQL types. 18 | * 19 | * @author Alan Poulain 20 | */ 21 | interface TypesFactoryInterface 22 | { 23 | public function getTypes(): array; 24 | } 25 | -------------------------------------------------------------------------------- /src/GraphQl/Util/ArrayTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\GraphQl\Util; 15 | 16 | /** 17 | * @internal 18 | */ 19 | trait ArrayTrait 20 | { 21 | public function isSequentialArrayOfArrays(array $array): bool 22 | { 23 | if (!$this->isSequentialArray($array)) { 24 | return false; 25 | } 26 | 27 | return $this->arrayContainsOnly($array, 'array'); 28 | } 29 | 30 | public function isSequentialArray(array $array): bool 31 | { 32 | if ([] === $array) { 33 | return false; 34 | } 35 | 36 | return array_is_list($array); 37 | } 38 | 39 | public function arrayContainsOnly(array $array, string $type): bool 40 | { 41 | return $array === array_filter($array, static fn ($item): bool => $type === \gettype($item)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Hal/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - HAL 2 | 3 | The [HAL (Hypertext Application Language)](https://stateless.group/hal_specification.html) component of the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/core/content-negotiation/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/HttpCache/PurgerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\HttpCache; 15 | 16 | /** 17 | * Purges resources from the cache. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | interface PurgerInterface 22 | { 23 | /** 24 | * Purges all responses containing the given resources from the cache. 25 | * 26 | * @param string[] $iris 27 | */ 28 | public function purge(array $iris): void; 29 | 30 | /** 31 | * Get the response header containing purged tags. 32 | * 33 | * @param string[] $iris 34 | */ 35 | public function getResponseHeaders(array $iris): array; 36 | } 37 | -------------------------------------------------------------------------------- /src/HttpCache/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - HTTP Cache 2 | 3 | The [HTTP Cache](https://httpwg.org/specs/rfc7234.html) component of the [API Platform](https://api-platform.com) framework. 4 | 5 | This component also provides integrations with [Varnish](https://varnish-cache.org/), [Souin](https://souin.io/) 6 | and other HTTP cache servers and services. 7 | 8 | [Documentation](https://api-platform.com/docs/core/performance/) 9 | 10 | > [!CAUTION] 11 | > 12 | > This is a read-only sub split of `api-platform/core`, please 13 | > [report issues](https://github.com/api-platform/core/issues) and 14 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 15 | > in the [core API Platform repository](https://github.com/api-platform/core). 16 | -------------------------------------------------------------------------------- /src/HttpCache/SouinPurger.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\HttpCache; 15 | 16 | use Symfony\Contracts\HttpClient\HttpClientInterface; 17 | 18 | /** 19 | * Purges Souin. 20 | * 21 | * @author Sylvain Combraque 22 | */ 23 | class SouinPurger extends SurrogateKeysPurger 24 | { 25 | private const MAX_HEADER_SIZE_PER_BATCH = 1500; 26 | private const SEPARATOR = ', '; 27 | private const HEADER = 'Surrogate-Key'; 28 | 29 | /** 30 | * @param HttpClientInterface[] $clients 31 | */ 32 | public function __construct(iterable $clients) 33 | { 34 | parent::__construct($clients, self::MAX_HEADER_SIZE_PER_BATCH, self::HEADER, self::SEPARATOR); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/HttpCache/VarnishXKeyPurger.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\HttpCache; 15 | 16 | use Symfony\Contracts\HttpClient\HttpClientInterface; 17 | 18 | /** 19 | * Purges Varnish XKey. 20 | * 21 | * @author Kévin Dunglas 22 | */ 23 | final class VarnishXKeyPurger extends SurrogateKeysPurger 24 | { 25 | private const VARNISH_MAX_HEADER_LENGTH = 8000; 26 | private const VARNISH_SEPARATOR = ' '; 27 | 28 | /** 29 | * @param HttpClientInterface[] $clients 30 | */ 31 | public function __construct(iterable $clients, int $maxHeaderLength = self::VARNISH_MAX_HEADER_LENGTH, string $xkeyGlue = self::VARNISH_SEPARATOR) 32 | { 33 | parent::__construct($clients, $maxHeaderLength, 'xkey', $xkeyGlue); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Hydra/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Hydra 2 | 3 | The [Hydra](https://www.hydra-cg.com/) component of the [API Platform](https://api-platform.com) framework. 4 | 5 | Hydra simplifies the development of interoperable, hypermedia-driven Web APIs. 6 | 7 | [Documentation](https://api-platform.com/docs/core/) 8 | 9 | > [!CAUTION] 10 | > 11 | > This is a read-only sub split of `api-platform/core`, please 12 | > [report issues](https://github.com/api-platform/core/issues) and 13 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 14 | > in the [core API Platform repository](https://github.com/api-platform/core). 15 | -------------------------------------------------------------------------------- /src/JsonApi/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - JSON:API 2 | 3 | The [JSON:API](https://jsonapi.org/) component of the [API Platform](https://api-platform.com) framework. 4 | 5 | JSON:API is a popular specification for building APIs in JSON. 6 | 7 | [Documentation](https://api-platform.com/docs/core/content-negotiation/) 8 | 9 | > [!CAUTION] 10 | > 11 | > This is a read-only sub split of `api-platform/core`, please 12 | > [report issues](https://github.com/api-platform/core/issues) and 13 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 14 | > in the [core API Platform repository](https://github.com/api-platform/core). 15 | -------------------------------------------------------------------------------- /src/JsonLd/AnonymousContextBuilderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\JsonLd; 15 | 16 | use ApiPlatform\Metadata\UrlGeneratorInterface; 17 | 18 | /** 19 | * JSON-LD context builder with Input Output DTO support interface. 20 | * 21 | * @author Antoine Bluchet 22 | */ 23 | interface AnonymousContextBuilderInterface extends ContextBuilderInterface 24 | { 25 | /** 26 | * Creates a JSON-LD context based on the given object. 27 | * Usually this is used with an Input or Output DTO object. 28 | */ 29 | public function getAnonymousResourceContext(object $object, array $context = [], int $referenceType = UrlGeneratorInterface::ABS_PATH): array; 30 | } 31 | -------------------------------------------------------------------------------- /src/JsonLd/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - JSON-LD 2 | 3 | The [JSON-LD](https://json-ld.org/) component of the [API Platform](https://api-platform.com) framework. 4 | 5 | Data is messy and disconnected. JSON-LD organizes and connects it, creating a better Web. 6 | 7 | [Documentation](https://api-platform.com/docs/core/extending-jsonld-context/) 8 | 9 | > [!CAUTION] 10 | > 11 | > This is a read-only sub split of `api-platform/core`, please 12 | > [report issues](https://github.com/api-platform/core/issues) and 13 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 14 | > in the [core API Platform repository](https://github.com/api-platform/core). 15 | -------------------------------------------------------------------------------- /src/JsonLd/Serializer/HydraPrefixTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\JsonLd\Serializer; 15 | 16 | use ApiPlatform\JsonLd\ContextBuilder; 17 | 18 | trait HydraPrefixTrait 19 | { 20 | /** 21 | * @param array $context 22 | */ 23 | private function getHydraPrefix(array $context): string 24 | { 25 | return ($context[ContextBuilder::HYDRA_CONTEXT_HAS_PREFIX] ?? true) ? ContextBuilder::HYDRA_PREFIX : ''; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/JsonSchema/DefinitionNameFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\JsonSchema; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | 18 | /** 19 | * Factory for creating definition names for resources in a JSON Schema document. 20 | * 21 | * @author Gwendolen Lynch 22 | */ 23 | interface DefinitionNameFactoryInterface 24 | { 25 | /** 26 | * Creates a resource definition name. 27 | * 28 | * @param class-string $className 29 | * 30 | * @return string the definition name 31 | */ 32 | public function create(string $className, string $format = 'json', ?string $inputOrOutputClass = null, ?Operation $operation = null, array $serializerContext = []): string; 33 | } 34 | -------------------------------------------------------------------------------- /src/JsonSchema/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - JSON Schema 2 | 3 | The [JSON Schema](https://json-schema.org/) component of the [API Platform](https://api-platform.com) framework. 4 | 5 | Generates JSON Schema from PHP classes. 6 | 7 | [Documentation](https://api-platform.com/docs/core/json-schema/) 8 | 9 | > [!CAUTION] 10 | > 11 | > This is a read-only sub split of `api-platform/core`, please 12 | > [report issues](https://github.com/api-platform/core/issues) and 13 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 14 | > in the [core API Platform repository](https://github.com/api-platform/core). 15 | -------------------------------------------------------------------------------- /src/JsonSchema/SchemaFactoryAwareInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\JsonSchema; 15 | 16 | interface SchemaFactoryAwareInterface 17 | { 18 | public function setSchemaFactory(SchemaFactoryInterface $schemaFactory): void; 19 | } 20 | -------------------------------------------------------------------------------- /src/JsonSchema/SchemaFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\JsonSchema; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | 18 | /** 19 | * Factory for creating the JSON Schema document corresponding to a PHP class. 20 | * 21 | * @author Kévin Dunglas 22 | */ 23 | interface SchemaFactoryInterface 24 | { 25 | public const FORCE_SUBSCHEMA = '_api_subschema_force_readable_link'; 26 | 27 | /** 28 | * Builds the JSON Schema document corresponding to the given PHP class. 29 | */ 30 | public function buildSchema(string $className, string $format = 'json', string $type = Schema::TYPE_OUTPUT, ?Operation $operation = null, ?Schema $schema = null, ?array $serializerContext = null, bool $forceCollection = false): Schema; 31 | } 32 | -------------------------------------------------------------------------------- /src/JsonSchema/SchemaUriPrefixTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\JsonSchema; 15 | 16 | /** 17 | * @internal 18 | */ 19 | trait SchemaUriPrefixTrait 20 | { 21 | public function getSchemaUriPrefix(string $version): string 22 | { 23 | return match ($version) { 24 | Schema::VERSION_OPENAPI => '#/components/schemas/', 25 | default => '#/definitions/', 26 | }; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Laravel/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to the Laravel Integration of API Platform 2 | 3 | Pull requests should be made at https://github.com/api-plaform/core 4 | 5 | ## Tests 6 | 7 | cd src/Laravel 8 | composer global require soyuka/pmu 9 | composer global link ../../ 10 | vendor/bin/testbench workbench:build 11 | vendor/bin/testbench api-platform:install 12 | vendor/bin/testbench package:test 13 | # or 14 | vendor/bin/phpunit 15 | 16 | A command is available to remove the database: 17 | 18 | vendor/bin/testbench workbench:drop-sqlite-db 19 | 20 | ## Starting the Test App 21 | 22 | The test server is also available through: 23 | 24 | vendor/bin/testbench serve 25 | -------------------------------------------------------------------------------- /src/Laravel/Console/Maker/MakeStateProcessorCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Console\Maker; 15 | 16 | use ApiPlatform\Laravel\Console\Maker\Utils\StateTypeEnum; 17 | 18 | final class MakeStateProcessorCommand extends AbstractMakeStateCommand 19 | { 20 | protected $signature = 'make:state-processor'; 21 | protected $description = 'Creates an API Platform state processor'; 22 | 23 | protected function getStateType(): StateTypeEnum 24 | { 25 | return StateTypeEnum::Processor; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Laravel/Console/Maker/MakeStateProviderCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Console\Maker; 15 | 16 | use ApiPlatform\Laravel\Console\Maker\Utils\StateTypeEnum; 17 | 18 | final class MakeStateProviderCommand extends AbstractMakeStateCommand 19 | { 20 | protected $signature = 'make:state-provider'; 21 | protected $description = 'Creates an API Platform state provider'; 22 | 23 | protected function getStateType(): StateTypeEnum 24 | { 25 | return StateTypeEnum::Provider; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Laravel/Console/Maker/Resources/skeleton/StateProcessor.php.tpl: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Console\Maker\Utils; 15 | 16 | enum StateTypeEnum 17 | { 18 | case Provider; 19 | case Processor; 20 | } 21 | -------------------------------------------------------------------------------- /src/Laravel/Console/Maker/Utils/SuccessMessageTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Console\Maker\Utils; 15 | 16 | trait SuccessMessageTrait 17 | { 18 | private function writeSuccessMessage(string $filePath, StateTypeEnum $stateTypeEnum): void 19 | { 20 | $stateText = strtolower($stateTypeEnum->name); 21 | 22 | $this->newLine(); 23 | $this->line(' '); 24 | $this->line(' Success! '); 25 | $this->line(' '); 26 | $this->newLine(); 27 | $this->line('created: '.$filePath.''); 28 | $this->newLine(); 29 | $this->line("Next: Open your new state $stateText class and start customizing it."); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Laravel/Eloquent/Extension/QueryExtensionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Eloquent\Extension; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use Illuminate\Database\Eloquent\Builder; 18 | use Illuminate\Database\Eloquent\Model; 19 | 20 | interface QueryExtensionInterface 21 | { 22 | /** 23 | * @param Builder $builder 24 | * @param array $uriVariables 25 | * @param array $context 26 | * 27 | * @return Builder 28 | */ 29 | public function apply(Builder $builder, array $uriVariables, Operation $operation, $context = []): Builder; 30 | } 31 | -------------------------------------------------------------------------------- /src/Laravel/Eloquent/Filter/EndSearchFilter.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Eloquent\Filter; 15 | 16 | use ApiPlatform\Metadata\Parameter; 17 | use Illuminate\Database\Eloquent\Builder; 18 | use Illuminate\Database\Eloquent\Model; 19 | 20 | final class EndSearchFilter implements FilterInterface 21 | { 22 | use QueryPropertyTrait; 23 | 24 | /** 25 | * @param Builder $builder 26 | * @param array $context 27 | */ 28 | public function apply(Builder $builder, mixed $values, Parameter $parameter, array $context = []): Builder 29 | { 30 | return $builder->{$context['whereClause'] ?? 'where'}($this->getQueryProperty($parameter), 'like', '%'.$values); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Laravel/Eloquent/Filter/EqualsFilter.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Eloquent\Filter; 15 | 16 | use ApiPlatform\Metadata\Parameter; 17 | use Illuminate\Database\Eloquent\Builder; 18 | use Illuminate\Database\Eloquent\Model; 19 | 20 | final class EqualsFilter implements FilterInterface 21 | { 22 | use QueryPropertyTrait; 23 | 24 | /** 25 | * @param Builder $builder 26 | * @param array $context 27 | */ 28 | public function apply(Builder $builder, mixed $values, Parameter $parameter, array $context = []): Builder 29 | { 30 | return $builder->{$context['whereClause'] ?? 'where'}($this->getQueryProperty($parameter), $values); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Laravel/Eloquent/Filter/FilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Eloquent\Filter; 15 | 16 | use ApiPlatform\Metadata\Parameter; 17 | use Illuminate\Database\Eloquent\Builder; 18 | use Illuminate\Database\Eloquent\Model; 19 | 20 | interface FilterInterface 21 | { 22 | /** 23 | * @param Builder $builder 24 | * @param array $context 25 | * 26 | * @return Builder 27 | */ 28 | public function apply(Builder $builder, mixed $values, Parameter $parameter, array $context = []): Builder; 29 | } 30 | -------------------------------------------------------------------------------- /src/Laravel/Eloquent/Filter/PartialSearchFilter.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Eloquent\Filter; 15 | 16 | use ApiPlatform\Metadata\Parameter; 17 | use Illuminate\Database\Eloquent\Builder; 18 | use Illuminate\Database\Eloquent\Model; 19 | 20 | final class PartialSearchFilter implements FilterInterface 21 | { 22 | use QueryPropertyTrait; 23 | 24 | /** 25 | * @param Builder $builder 26 | * @param array $context 27 | */ 28 | public function apply(Builder $builder, mixed $values, Parameter $parameter, array $context = []): Builder 29 | { 30 | return $builder->{$context['whereClause'] ?? 'where'}($this->getQueryProperty($parameter), 'like', '%'.$values.'%'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Laravel/Eloquent/Filter/QueryPropertyTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Eloquent\Filter; 15 | 16 | use ApiPlatform\Metadata\Parameter; 17 | 18 | /** 19 | * @internal 20 | */ 21 | trait QueryPropertyTrait 22 | { 23 | private function getQueryProperty(Parameter $parameter): ?string 24 | { 25 | return $parameter->getExtraProperties()['_query_property'] ?? $parameter->getProperty() ?? null; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Laravel/Eloquent/Filter/StartSearchFilter.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Eloquent\Filter; 15 | 16 | use ApiPlatform\Metadata\Parameter; 17 | use Illuminate\Database\Eloquent\Builder; 18 | use Illuminate\Database\Eloquent\Model; 19 | 20 | final class StartSearchFilter implements FilterInterface 21 | { 22 | use QueryPropertyTrait; 23 | 24 | /** 25 | * @param Builder $builder 26 | * @param array $context 27 | */ 28 | public function apply(Builder $builder, mixed $values, Parameter $parameter, array $context = []): Builder 29 | { 30 | return $builder->{$context['whereClause'] ?? 'where'}($this->getQueryProperty($parameter), 'like', $values.'%'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Laravel/Eloquent/State/RemoveProcessor.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Eloquent\State; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use ApiPlatform\State\ProcessorInterface; 18 | 19 | /** 20 | * @implements ProcessorInterface<\Illuminate\Database\Eloquent\Model, null> 21 | */ 22 | final class RemoveProcessor implements ProcessorInterface 23 | { 24 | public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []) 25 | { 26 | $data->delete(); 27 | 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Laravel/GraphQl/Controller/GraphiQlController.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\GraphQl\Controller; 15 | 16 | use Illuminate\Http\Response; 17 | 18 | readonly class GraphiQlController 19 | { 20 | public function __construct(private readonly string $prefix) 21 | { 22 | } 23 | 24 | public function __invoke(): Response 25 | { 26 | return new Response(view('api-platform::graphiql', ['graphiql_data' => ['entrypoint' => $this->prefix.'/graphql']]), 200); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Laravel/README.md: -------------------------------------------------------------------------------- 1 | # API Platform for Laravel 2 | 3 | Integration of [Laravel](https://laravel.com) and the Illuminate components with the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/laravel/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/Laravel/Security/ResourceAccessChecker.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Security; 15 | 16 | use ApiPlatform\Laravel\Eloquent\Paginator; 17 | use ApiPlatform\Metadata\ResourceAccessCheckerInterface; 18 | use Illuminate\Support\Facades\Gate; 19 | 20 | class ResourceAccessChecker implements ResourceAccessCheckerInterface 21 | { 22 | public function isGranted(string $resourceClass, string $expression, array $extraVariables = []): bool 23 | { 24 | return Gate::allows( 25 | $expression, 26 | $extraVariables['object'] instanceof Paginator ? 27 | $resourceClass : 28 | $extraVariables['object'] 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Laravel/Test/Constraint/ArraySubset.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Laravel\Test\Constraint; 15 | 16 | use PHPUnit\Framework\Constraint\Constraint; 17 | 18 | /** 19 | * Is used for phpunit >= 9. 20 | * 21 | * @internal 22 | */ 23 | final class ArraySubset extends Constraint 24 | { 25 | use ArraySubsetTrait; 26 | 27 | /** 28 | * {@inheritdoc} 29 | */ 30 | public function evaluate(mixed $other, string $description = '', bool $returnResult = false): ?bool 31 | { 32 | return $this->_evaluate($other, $description, $returnResult); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-ext-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-ext-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-ext-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-ext-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-ext-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-ext-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-ext-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-cyrillic-ext-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-greek-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-greek-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-greek-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-greek-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-greek-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-greek-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-greek-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-greek-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-greek-ext-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-greek-ext-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-greek-ext-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-greek-ext-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-greek-ext-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-greek-ext-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-greek-ext-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-greek-ext-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-hebrew-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-hebrew-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-hebrew-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-hebrew-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-latin-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-latin-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-latin-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-latin-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-latin-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-latin-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-latin-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-latin-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-latin-ext-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-latin-ext-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-latin-ext-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-latin-ext-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-latin-ext-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-latin-ext-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-latin-ext-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-latin-ext-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-math-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-math-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-math-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-math-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-math-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-math-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-math-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-math-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-symbols-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-symbols-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-symbols-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-symbols-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-symbols-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-symbols-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-symbols-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-symbols-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-vietnamese-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-vietnamese-400-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-vietnamese-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-vietnamese-400-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-vietnamese-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-vietnamese-700-normal.woff -------------------------------------------------------------------------------- /src/Laravel/public/fonts/open-sans/files/open-sans-vietnamese-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/fonts/open-sans/files/open-sans-vietnamese-700-normal.woff2 -------------------------------------------------------------------------------- /src/Laravel/public/graphql-playground/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | overflow: hidden; 6 | } 7 | 8 | #root { 9 | height: 100%; 10 | } 11 | 12 | body { 13 | font-family: 'Open Sans', sans-serif; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | color: rgba(0,0,0,.8); 17 | line-height: 1.5; 18 | height: 100vh; 19 | letter-spacing: 0.53px; 20 | margin-right: -1px !important; 21 | } 22 | 23 | html, body, p, a, h1, h2, h3, h4, ul, pre, code { 24 | margin: 0; 25 | padding: 0; 26 | color: inherit; 27 | } 28 | 29 | a:active, a:focus, button:focus, input:focus { 30 | outline: none; 31 | } 32 | 33 | input, button, submit { 34 | border: none; 35 | } 36 | 37 | input, button, pre { 38 | font-family: 'Open Sans', sans-serif; 39 | } 40 | 41 | code { 42 | font-family: Consolas, monospace; 43 | } 44 | 45 | /*# sourceMappingURL=index.css.map*/ -------------------------------------------------------------------------------- /src/Laravel/public/init-common-ui.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const graphiQlLink = document.querySelector('.graphiql-link'); 4 | if (graphiQlLink) { 5 | graphiQlLink.addEventListener('click', e => { 6 | if (!e.target.hasAttribute('href')) { 7 | alert('GraphQL support is not enabled, see https://api-platform.com/docs/core/graphql/'); 8 | } 9 | }); 10 | } 11 | -------------------------------------------------------------------------------- /src/Laravel/public/init-graphql-playground.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', function(event) { 2 | var loadingWrapper = document.getElementById('loading-wrapper'); 3 | loadingWrapper.classList.add('fadeOut'); 4 | 5 | var root = document.getElementById('graphql-playground'); 6 | root.classList.add('playgroundIn'); 7 | 8 | var data = JSON.parse(document.getElementById('graphql-playground-data').innerText); 9 | GraphQLPlayground.init(root, { 10 | 'endpoint': data.entrypoint 11 | }) 12 | }); 13 | -------------------------------------------------------------------------------- /src/Laravel/public/init-redoc-ui.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | window.onload = () => { 4 | const data = JSON.parse(document.getElementById('swagger-data').innerText); 5 | 6 | Redoc.init(data.spec, {}, document.getElementById('swagger-ui')); 7 | }; 8 | -------------------------------------------------------------------------------- /src/Laravel/public/web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/web.png -------------------------------------------------------------------------------- /src/Laravel/public/webby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Laravel/public/webby.png -------------------------------------------------------------------------------- /src/Laravel/resources/views/graphiql.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ config('api-platform.title') }} - API Platform 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
Loading...
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Metadata/CollectionOperationInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | /** 17 | * The Operation returns a collection. 18 | */ 19 | interface CollectionOperationInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/Metadata/DeleteOperationInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | /** 17 | * The Operation deletes content. 18 | */ 19 | interface DeleteOperationInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/Metadata/ErrorResourceInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | interface ErrorResourceInterface 17 | { 18 | public static function createFromException(\Exception|\Throwable $exception, int $status): self; 19 | } 20 | -------------------------------------------------------------------------------- /src/Metadata/Exception/ErrorCodeSerializableInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * An exception which has a serializable application-specific error code. 18 | */ 19 | interface ErrorCodeSerializableInterface 20 | { 21 | /** 22 | * Gets the application-specific error code. 23 | */ 24 | public static function getErrorCode(): string; 25 | } 26 | -------------------------------------------------------------------------------- /src/Metadata/Exception/ExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Base exception interface. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | interface ExceptionInterface extends \Throwable 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Exception/HttpExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | interface HttpExceptionInterface 17 | { 18 | /** 19 | * Returns the status code. 20 | */ 21 | public function getStatusCode(): int; 22 | 23 | /** 24 | * Returns response headers. 25 | */ 26 | public function getHeaders(): array; 27 | } 28 | -------------------------------------------------------------------------------- /src/Metadata/Exception/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Invalid argument exception. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Exception/InvalidIdentifierException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Identifier is not valid exception. 18 | * 19 | * @author Antoine Bluchet 20 | */ 21 | final class InvalidIdentifierException extends \Exception implements ExceptionInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Exception/InvalidUriVariableException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Identifier is not valid exception. 18 | * 19 | * @author Antoine Bluchet 20 | */ 21 | final class InvalidUriVariableException extends \Exception implements ExceptionInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Exception/ItemNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Item not found exception. 18 | * 19 | * @author Amrouche Hamza 20 | */ 21 | class ItemNotFoundException extends InvalidArgumentException 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Exception/NotExposedHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; 17 | 18 | /** 19 | * @author Vincent Chalamon 20 | */ 21 | class NotExposedHttpException extends NotFoundHttpException 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Exception/OperationNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Operation not found exception. 18 | */ 19 | class OperationNotFoundException extends \InvalidArgumentException implements ExceptionInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/Metadata/Exception/ProblemExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Implements the Problem Error specification. 18 | */ 19 | interface ProblemExceptionInterface 20 | { 21 | public function getType(): string; 22 | 23 | /** 24 | * Note from RFC rfc7807: "title" (string) - A short, human-readable summary of the problem type. 25 | * It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. 26 | */ 27 | public function getTitle(): ?string; 28 | 29 | public function getStatus(): ?int; 30 | 31 | public function getDetail(): ?string; 32 | 33 | public function getInstance(): ?string; 34 | } 35 | -------------------------------------------------------------------------------- /src/Metadata/Exception/PropertyNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Property not found exception. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | class PropertyNotFoundException extends \Exception implements ExceptionInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Exception/ResourceClassNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Resource class not found exception. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | class ResourceClassNotFoundException extends \Exception implements ExceptionInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Exception/RuntimeException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | /** 17 | * Runtime exception. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | class RuntimeException extends \RuntimeException implements ExceptionInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Exception/StatusAwareExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Exception; 15 | 16 | interface StatusAwareExceptionInterface 17 | { 18 | /** 19 | * Sets the status code. 20 | */ 21 | public function setStatus(int $status): void; 22 | } 23 | -------------------------------------------------------------------------------- /src/Metadata/Exception/UnsupportedMediaTypeHttpException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Metadata/Exception/UnsupportedMediaTypeHttpException.php -------------------------------------------------------------------------------- /src/Metadata/Extractor/PropertyExtractorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Extractor; 15 | 16 | use ApiPlatform\Metadata\Exception\InvalidArgumentException; 17 | 18 | /** 19 | * Extracts an array of metadata from a file or a list of files. 20 | * 21 | * @author Vincent Chalamon 22 | */ 23 | interface PropertyExtractorInterface 24 | { 25 | /** 26 | * Parses all metadata files and convert them in an array. 27 | * 28 | * @throws InvalidArgumentException 29 | */ 30 | public function getProperties(): array; 31 | } 32 | -------------------------------------------------------------------------------- /src/Metadata/Extractor/ResourceExtractorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Extractor; 15 | 16 | use ApiPlatform\Metadata\Exception\InvalidArgumentException; 17 | 18 | /** 19 | * Extracts an array of metadata from a file or a list of files. 20 | * 21 | * @author Kévin Dunglas 22 | * @author Vincent Chalamon 23 | */ 24 | interface ResourceExtractorInterface 25 | { 26 | /** 27 | * Parses all metadata files and convert them in an array. 28 | * 29 | * @throws InvalidArgumentException 30 | */ 31 | public function getResources(): array; 32 | } 33 | -------------------------------------------------------------------------------- /src/Metadata/GraphQl/DeleteMutation.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\GraphQl; 15 | 16 | use ApiPlatform\Metadata\DeleteOperationInterface; 17 | 18 | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] 19 | class DeleteMutation extends Mutation implements DeleteOperationInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/Metadata/GraphQl/Mutation.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\GraphQl; 15 | 16 | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] 17 | class Mutation extends Operation 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /src/Metadata/HeaderParameter.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | /** 17 | * @experimental 18 | */ 19 | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] 20 | class HeaderParameter extends Parameter implements HeaderParameterInterface 21 | { 22 | } 23 | -------------------------------------------------------------------------------- /src/Metadata/HeaderParameterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | /** 17 | * @experimental 18 | */ 19 | interface HeaderParameterInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/Metadata/IdentifiersExtractorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | use ApiPlatform\Metadata\Exception\RuntimeException; 17 | 18 | /** 19 | * Extracts identifiers for a given Resource according to the retrieved Metadata. 20 | * 21 | * @author Antoine Bluchet 22 | */ 23 | interface IdentifiersExtractorInterface 24 | { 25 | /** 26 | * Finds identifiers from an Item (object). 27 | * 28 | * @param array $context 29 | * 30 | * @throws RuntimeException 31 | * 32 | * @return array 33 | */ 34 | public function getIdentifiersFromItem(object $item, ?Operation $operation = null, array $context = []): array; 35 | } 36 | -------------------------------------------------------------------------------- /src/Metadata/InflectorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | interface InflectorInterface 17 | { 18 | /** 19 | * Returns a snake case transformed string. 20 | */ 21 | public function tableize(string $input): string; 22 | 23 | /** 24 | * Returns the plural forms of a string. 25 | */ 26 | public function pluralize(string $singular): string; 27 | } 28 | -------------------------------------------------------------------------------- /src/Metadata/IsApiResource.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | /** 17 | * @author Kévin Dunglas 18 | */ 19 | trait IsApiResource 20 | { 21 | public static function apiResource(): ApiResource 22 | { 23 | return new ApiResource(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Metadata/JsonSchemaFilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | interface JsonSchemaFilterInterface 17 | { 18 | /** 19 | * @return array 20 | */ 21 | public function getSchema(Parameter $parameter): array; 22 | } 23 | -------------------------------------------------------------------------------- /src/Metadata/OpenApiParameterFilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | use ApiPlatform\OpenApi\Model\Parameter as OpenApiParameter; 17 | 18 | interface OpenApiParameterFilterInterface 19 | { 20 | /** 21 | * @return OpenApiParameter|OpenApiParameter[]|null 22 | */ 23 | public function getOpenApiParameters(Parameter $parameter): OpenApiParameter|array|null; 24 | } 25 | -------------------------------------------------------------------------------- /src/Metadata/Operation/Factory/OperationMetadataFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Operation\Factory; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | 18 | interface OperationMetadataFactoryInterface 19 | { 20 | public function create(string $uriTemplate, array $context = []): ?Operation; 21 | } 22 | -------------------------------------------------------------------------------- /src/Metadata/Operation/PathSegmentNameGeneratorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Operation; 15 | 16 | /** 17 | * Generates a path name according to a string and whether it's a collection or not. 18 | * 19 | * @author Antoine Bluchet 20 | */ 21 | interface PathSegmentNameGeneratorInterface 22 | { 23 | /** 24 | * Transforms a given string to a valid path name which can be pluralized (eg. for collections). 25 | * 26 | * @param string $name Usually a ResourceMetadata shortname 27 | * 28 | * @return string A string that is a part of the route name 29 | */ 30 | public function getSegmentName(string $name, bool $collection = true): string; 31 | } 32 | -------------------------------------------------------------------------------- /src/Metadata/ParameterProviderFilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | interface ParameterProviderFilterInterface 17 | { 18 | public static function getParameterProvider(): string; 19 | } 20 | -------------------------------------------------------------------------------- /src/Metadata/PropertiesAwareInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | /** 17 | * This interface makes a Parameter aware of the properties it can filter on. 18 | * It can be set on a Filter or a Parameter, properties are available in 19 | * extraProperties['_properties']. 20 | */ 21 | interface PropertiesAwareInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /src/Metadata/Property/Factory/PropertyMetadataFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Property\Factory; 15 | 16 | use ApiPlatform\Metadata\ApiProperty; 17 | use ApiPlatform\Metadata\Exception\PropertyNotFoundException; 18 | 19 | /** 20 | * Creates a property metadata value object. 21 | * 22 | * @author Kévin Dunglas 23 | */ 24 | interface PropertyMetadataFactoryInterface 25 | { 26 | /** 27 | * Creates a property metadata. 28 | * 29 | * @param array $options 30 | * @param class-string|string $resourceClass 31 | * 32 | * @throws PropertyNotFoundException 33 | */ 34 | public function create(string $resourceClass, string $property, array $options = []): ApiProperty; 35 | } 36 | -------------------------------------------------------------------------------- /src/Metadata/Property/Factory/PropertyNameCollectionFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Property\Factory; 15 | 16 | use ApiPlatform\Metadata\Exception\ResourceClassNotFoundException; 17 | use ApiPlatform\Metadata\Property\PropertyNameCollection; 18 | 19 | /** 20 | * Creates a property name collection value object. 21 | * 22 | * @author Kévin Dunglas 23 | */ 24 | interface PropertyNameCollectionFactoryInterface 25 | { 26 | /** 27 | * Creates the property name collection for the given class and options. 28 | * 29 | * @param array $options 30 | * 31 | * @throws ResourceClassNotFoundException 32 | */ 33 | public function create(string $resourceClass, array $options = []): PropertyNameCollection; 34 | } 35 | -------------------------------------------------------------------------------- /src/Metadata/QueryParameter.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | /** 17 | * @experimental 18 | */ 19 | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] 20 | class QueryParameter extends Parameter implements QueryParameterInterface 21 | { 22 | } 23 | -------------------------------------------------------------------------------- /src/Metadata/QueryParameterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | /** 17 | * @experimental 18 | */ 19 | interface QueryParameterInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/Metadata/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Metadata 2 | 3 | The Metadata component of the [API Platform](https://api-platform.com) framework. 4 | 5 | Generates abstract representation of web APIs. It's the core of the API Platform Core library. 6 | 7 | [Documentation](https://api-platform.com/docs/core/) 8 | 9 | > [!CAUTION] 10 | > 11 | > This is a read-only sub split of `api-platform/core`, please 12 | > [report issues](https://github.com/api-platform/core/issues) and 13 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 14 | > in the [core API Platform repository](https://github.com/api-platform/core). 15 | -------------------------------------------------------------------------------- /src/Metadata/Resource/Factory/PropertyLinkFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Resource\Factory; 15 | 16 | use ApiPlatform\Metadata\Link; 17 | use ApiPlatform\Metadata\Metadata; 18 | 19 | /** 20 | * @internal 21 | */ 22 | interface PropertyLinkFactoryInterface 23 | { 24 | /** 25 | * Create a link for a given property. 26 | */ 27 | public function createLinkFromProperty(Metadata $operation, string $property): Link; 28 | } 29 | -------------------------------------------------------------------------------- /src/Metadata/Resource/Factory/ResourceMetadataCollectionFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Resource\Factory; 15 | 16 | use ApiPlatform\Metadata\Exception\ResourceClassNotFoundException; 17 | use ApiPlatform\Metadata\Resource\ResourceMetadataCollection; 18 | 19 | /** 20 | * Creates a resource metadata value object. 21 | * 22 | * @author Antoine Bluchet 23 | */ 24 | interface ResourceMetadataCollectionFactoryInterface 25 | { 26 | /** 27 | * Creates a resource metadata. 28 | * 29 | * @param string|class-string $resourceClass 30 | * 31 | * @throws ResourceClassNotFoundException 32 | */ 33 | public function create(string $resourceClass): ResourceMetadataCollection; 34 | } 35 | -------------------------------------------------------------------------------- /src/Metadata/Resource/Factory/ResourceNameCollectionFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Resource\Factory; 15 | 16 | use ApiPlatform\Metadata\Resource\ResourceNameCollection; 17 | 18 | /** 19 | * Creates a resource name collection value object. 20 | * 21 | * @author Kévin Dunglas 22 | */ 23 | interface ResourceNameCollectionFactoryInterface 24 | { 25 | /** 26 | * Creates the resource name collection. 27 | */ 28 | public function create(): ResourceNameCollection; 29 | } 30 | -------------------------------------------------------------------------------- /src/Metadata/ResourceAccessCheckerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | interface ResourceAccessCheckerInterface 17 | { 18 | /** 19 | * Checks if the given item can be accessed by the current user. 20 | * 21 | * @param array{object?: mixed, previous_object?: mixed, request?: \Symfony\Component\HttpFoundation\Request} $extraVariables 22 | */ 23 | public function isGranted(string $resourceClass, string $expression, array $extraVariables = []): bool; 24 | } 25 | -------------------------------------------------------------------------------- /src/Metadata/UriVariableTransformer/IntegerUriVariableTransformer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\UriVariableTransformer; 15 | 16 | use ApiPlatform\Metadata\UriVariableTransformerInterface; 17 | use Symfony\Component\TypeInfo\TypeIdentifier; 18 | 19 | final class IntegerUriVariableTransformer implements UriVariableTransformerInterface 20 | { 21 | public function transform(mixed $value, array $types, array $context = []): int 22 | { 23 | return (int) $value; 24 | } 25 | 26 | public function supportsTransformation(mixed $value, array $types, array $context = []): bool 27 | { 28 | return TypeIdentifier::INT->value === $types[0] && \is_string($value); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Metadata/Util/CloneTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Util; 15 | 16 | /** 17 | * Clones given data if cloneable. 18 | * 19 | * @internal 20 | * 21 | * @author Quentin Barloy 22 | */ 23 | trait CloneTrait 24 | { 25 | public function clone(mixed $data): mixed 26 | { 27 | if (!\is_object($data)) { 28 | return $data; 29 | } 30 | 31 | try { 32 | return (new \ReflectionClass($data))->isCloneable() ? clone $data : null; 33 | } catch (\ReflectionException) { 34 | return null; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Metadata/Util/SortTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata\Util; 15 | 16 | /** 17 | * Sort helper methods. 18 | * 19 | * @internal 20 | * 21 | * @author Alan Poulain 22 | */ 23 | trait SortTrait 24 | { 25 | private function arrayRecursiveSort(array &$array, callable $sortFunction): void 26 | { 27 | foreach ($array as &$value) { 28 | if (\is_array($value)) { 29 | $this->arrayRecursiveSort($value, $sortFunction); 30 | } 31 | } 32 | unset($value); 33 | $sortFunction($array); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Metadata/WithResourceTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Metadata; 15 | 16 | trait WithResourceTrait 17 | { 18 | protected function copyFrom(Metadata $resource): static 19 | { 20 | $self = clone $this; 21 | foreach (get_class_methods($resource) as $method) { 22 | if ( 23 | method_exists($self, $method) 24 | && preg_match('/^(?:get|is|can)(.*)/', (string) $method, $matches) 25 | && null === $self->{$method}() 26 | && null !== $val = $resource->{$method}() 27 | ) { 28 | $self = $self->{"with{$matches[1]}"}($val); 29 | } 30 | } 31 | 32 | return $self->withExtraProperties(array_merge($resource->getExtraProperties(), $self->getExtraProperties())); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/OpenApi/Factory/OpenApiFactoryInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\OpenApi\Factory; 15 | 16 | use ApiPlatform\OpenApi\OpenApi; 17 | 18 | interface OpenApiFactoryInterface 19 | { 20 | /** 21 | * Creates an OpenApi class. 22 | * 23 | * @param array $context 24 | */ 25 | public function __invoke(array $context = []): OpenApi; 26 | } 27 | -------------------------------------------------------------------------------- /src/OpenApi/Model/ExtensionTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\OpenApi\Model; 15 | 16 | trait ExtensionTrait 17 | { 18 | private array $extensionProperties = []; 19 | 20 | public function withExtensionProperty(string $key, $value): mixed 21 | { 22 | if (!str_starts_with($key, 'x-')) { 23 | $key = 'x-'.$key; 24 | } 25 | 26 | $clone = clone $this; 27 | $clone->extensionProperties[$key] = $value; 28 | 29 | return $clone; 30 | } 31 | 32 | public function getExtensionProperties(): array 33 | { 34 | return $this->extensionProperties; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/OpenApi/Model/Paths.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\OpenApi\Model; 15 | 16 | final class Paths 17 | { 18 | private array $paths = []; 19 | 20 | public function addPath(string $path, PathItem $pathItem): void 21 | { 22 | $this->paths[$path] = $pathItem; 23 | } 24 | 25 | public function getPath(string $path): ?PathItem 26 | { 27 | return $this->paths[$path] ?? null; 28 | } 29 | 30 | public function getPaths(): array 31 | { 32 | return $this->paths; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/OpenApi/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - OpenAPI 2 | 3 | The [OpenAPI](https://www.openapis.org) component of the [API Platform](https://api-platform.com) framework. 4 | 5 | Builds and serializes OpenAPI specifications. OpenAPI was formerly known as Swagger. 6 | 7 | [Documentation](https://api-platform.com/docs/core/openapi/) 8 | 9 | > [!CAUTION] 10 | > 11 | > This is a read-only sub split of `api-platform/core`, please 12 | > [report issues](https://github.com/api-platform/core/issues) and 13 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 14 | > in the [core API Platform repository](https://github.com/api-platform/core). 15 | -------------------------------------------------------------------------------- /src/OpenApi/Serializer/NormalizeOperationNameTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\OpenApi\Serializer; 15 | 16 | /** 17 | * Transforms the operation name to a readable operation id. 18 | * 19 | * @author soyuka 20 | */ 21 | trait NormalizeOperationNameTrait 22 | { 23 | private function normalizeOperationName(string $operationName): string 24 | { 25 | return preg_replace('/^_/', '', str_replace(['/', '{._format}', '{', '}'], ['', '', '_', ''], $operationName)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/OpenApi/State/OpenApiProvider.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\OpenApi\State; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use ApiPlatform\OpenApi\Factory\OpenApiFactoryInterface; 18 | use ApiPlatform\OpenApi\OpenApi; 19 | use ApiPlatform\State\ProviderInterface; 20 | 21 | /** 22 | * @internal 23 | */ 24 | final class OpenApiProvider implements ProviderInterface 25 | { 26 | public function __construct(private readonly OpenApiFactoryInterface $openApiFactory) 27 | { 28 | } 29 | 30 | public function provide(Operation $operation, array $uriVariables = [], array $context = []): OpenApi 31 | { 32 | return $this->openApiFactory->__invoke($context); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/RamseyUuid/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - `ramsey/uuid 2 | 3 | Integration for [`ramsey/uuid`](https://uuid.ramsey.dev) with the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/core/identifiers/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/Serializer/ContextTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Serializer; 15 | 16 | /** 17 | * Creates and manipulates the Serializer context. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | trait ContextTrait 22 | { 23 | /** 24 | * Initializes the context. 25 | */ 26 | private function initContext(string $resourceClass, array $context): array 27 | { 28 | return array_merge($context, [ 29 | 'api_sub_level' => true, 30 | 'resource_class' => $resourceClass, 31 | ]); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Serializer/Filter/FilterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Serializer\Filter; 15 | 16 | use ApiPlatform\Metadata\FilterInterface as BaseFilterInterface; 17 | use Symfony\Component\HttpFoundation\Request; 18 | 19 | /** 20 | * Symfony serializer context builder filter interface. 21 | * 22 | * @author Baptiste Meyer 23 | */ 24 | interface FilterInterface extends BaseFilterInterface 25 | { 26 | /** 27 | * Apply a filter to the serializer context. 28 | */ 29 | public function apply(Request $request, bool $normalization, array $attributes, array &$context): void; 30 | } 31 | -------------------------------------------------------------------------------- /src/Serializer/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Serializer 2 | 3 | The Serializer component of the [API Platform](https://api-platform.com) framework. 4 | 5 | Serializes PHP objects in various API formats. 6 | Built on top of the Symfony Serializer component. 7 | 8 | [Documentation](https://api-platform.com/docs/core/serialization/) 9 | 10 | > [!CAUTION] 11 | > 12 | > This is a read-only sub split of `api-platform/core`, please 13 | > [report issues](https://github.com/api-platform/core/issues) and 14 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 15 | > in the [core API Platform repository](https://github.com/api-platform/core). 16 | -------------------------------------------------------------------------------- /src/Serializer/TagCollectorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Serializer; 15 | 16 | /** 17 | * Interface for collecting cache tags during normalization. 18 | * 19 | * @author Urban Suppiger 20 | */ 21 | interface TagCollectorInterface 22 | { 23 | /** 24 | * Collect cache tags for cache invalidation. 25 | * 26 | * @param array&array{iri?: string, data?: mixed, object?: mixed, property_metadata?: \ApiPlatform\Metadata\ApiProperty, api_attribute?: string, resources?: array, format?: string, operation?: \ApiPlatform\Metadata\Operation} $context 27 | */ 28 | public function collect(array $context = []): void; 29 | } 30 | -------------------------------------------------------------------------------- /src/State/Exception/ProviderNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State\Exception; 15 | 16 | use ApiPlatform\Metadata\Exception\RuntimeException; 17 | 18 | final class ProviderNotFoundException extends RuntimeException 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /src/State/OptionsInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State; 15 | 16 | interface OptionsInterface 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/State/Pagination/HasNextPagePaginatorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State\Pagination; 15 | 16 | interface HasNextPagePaginatorInterface 17 | { 18 | /** 19 | * Does this collection offer a next page. 20 | */ 21 | public function hasNextPage(): bool; 22 | } 23 | -------------------------------------------------------------------------------- /src/State/Pagination/PaginatorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State\Pagination; 15 | 16 | /** 17 | * The \Countable implementation should return the number of items on the 18 | * current page, as an integer. 19 | * 20 | * @author Kévin Dunglas 21 | * 22 | * @template T of object 23 | * 24 | * @extends PartialPaginatorInterface 25 | */ 26 | interface PaginatorInterface extends PartialPaginatorInterface 27 | { 28 | /** 29 | * Gets last page. 30 | */ 31 | public function getLastPage(): float; 32 | 33 | /** 34 | * Gets the number of items in the whole collection. 35 | */ 36 | public function getTotalItems(): float; 37 | } 38 | -------------------------------------------------------------------------------- /src/State/Pagination/PartialPaginatorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State\Pagination; 15 | 16 | /** 17 | * Partial Paginator Interface. 18 | * 19 | * @author Baptiste Meyer 20 | * 21 | * @template T of object 22 | * 23 | * @extends \Traversable 24 | */ 25 | interface PartialPaginatorInterface extends \Traversable, \Countable 26 | { 27 | /** 28 | * Gets the current page number. 29 | */ 30 | public function getCurrentPage(): float; 31 | 32 | /** 33 | * Gets the number of items by page. 34 | */ 35 | public function getItemsPerPage(): float; 36 | } 37 | -------------------------------------------------------------------------------- /src/State/ParameterNotFound.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State; 15 | 16 | /** 17 | * @experimental 18 | */ 19 | final class ParameterNotFound 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/State/ParameterProviderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State; 15 | 16 | use ApiPlatform\Metadata\Operation; 17 | use ApiPlatform\Metadata\Parameter; 18 | 19 | /** 20 | * Optionnaly transforms request parameters and provides modification to the current Operation. 21 | * 22 | * @experimental 23 | */ 24 | interface ParameterProviderInterface 25 | { 26 | /** 27 | * @param array $parameters 28 | * @param array|array{request?: Request, resource_class?: string, operation: Operation} $context 29 | */ 30 | public function provide(Parameter $parameter, array $parameters = [], array $context = []): ?Operation; 31 | } 32 | -------------------------------------------------------------------------------- /src/State/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Serializer 2 | 3 | The State component of the [API Platform](https://api-platform.com) framework. 4 | 5 | Provides and processes API states. 6 | 7 | Documentation: 8 | 9 | * [State providers](https://api-platform.com/docs/core/state-providers/) 10 | * [State processors](https://api-platform.com/docs/core/state-processors/) 11 | 12 | > [!CAUTION] 13 | > 14 | > This is a read-only sub split of `api-platform/core`, please 15 | > [report issues](https://github.com/api-platform/core/issues) and 16 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 17 | > in the [core API Platform repository](https://github.com/api-platform/core). 18 | -------------------------------------------------------------------------------- /src/State/ResourceList.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State; 15 | 16 | /** 17 | * @internal 18 | */ 19 | class ResourceList extends \ArrayObject 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /src/State/SerializerAwareProviderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State; 15 | 16 | use Psr\Container\ContainerInterface; 17 | 18 | /** 19 | * Injects serializer in providers. 20 | * 21 | * @author Vincent Chalamon 22 | */ 23 | interface SerializerAwareProviderInterface 24 | { 25 | public function setSerializerLocator(ContainerInterface $serializerLocator); 26 | } 27 | -------------------------------------------------------------------------------- /src/State/SerializerAwareProviderTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State; 15 | 16 | use Psr\Container\ContainerInterface; 17 | use Symfony\Component\Serializer\SerializerInterface; 18 | 19 | /** 20 | * Injects serializer in providers. 21 | * 22 | * @author Vincent Chalamon 23 | */ 24 | trait SerializerAwareProviderTrait 25 | { 26 | /** 27 | * @internal 28 | */ 29 | private ContainerInterface $serializerLocator; 30 | 31 | public function setSerializerLocator(ContainerInterface $serializerLocator): void 32 | { 33 | $this->serializerLocator = $serializerLocator; 34 | } 35 | 36 | private function getSerializer(): SerializerInterface 37 | { 38 | return $this->serializerLocator->get('serializer'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/State/Util/CorsTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\State\Util; 15 | 16 | use Symfony\Component\HttpFoundation\Request; 17 | 18 | /** 19 | * CORS utils. 20 | * 21 | * @internal 22 | * 23 | * @author Kévin Dunglas 24 | */ 25 | trait CorsTrait 26 | { 27 | public function isPreflightRequest(Request $request): bool 28 | { 29 | return $request->isMethod('OPTIONS') && $request->headers->has('Access-Control-Request-Method'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Symfony/Action/NotExposedAction.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Action; 15 | 16 | use ApiPlatform\Metadata\Exception\NotExposedHttpException; 17 | use Symfony\Component\HttpFoundation\Request; 18 | 19 | /** 20 | * An action which always returns HTTP 404 Not Found with an explanation for why the operation is not exposed. 21 | */ 22 | final class NotExposedAction 23 | { 24 | public function __invoke(Request $request): never 25 | { 26 | $message = 'This route does not aim to be called.'; 27 | if ('api_genid' === $request->attributes->get('_route')) { 28 | $message = 'This route is not exposed on purpose. It generates an IRI for a collection resource without identifier nor item operation.'; 29 | } 30 | 31 | throw new NotExposedHttpException($message); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Symfony/Action/NotFoundAction.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Action; 15 | 16 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; 17 | 18 | /** 19 | * An action which always returns HTTP 404 Not Found. Useful for disabling an operation. 20 | */ 21 | final class NotFoundAction 22 | { 23 | public function __invoke(): void 24 | { 25 | throw new NotFoundHttpException(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Symfony/Action/PlaceholderAction.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Action; 15 | 16 | /** 17 | * Placeholder returning the data passed in parameter. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | final class PlaceholderAction 22 | { 23 | /** 24 | * @param object $data 25 | * 26 | * @return object 27 | */ 28 | public function __invoke($data) 29 | { 30 | return $data; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/ArgumentResolver/CompatibleValueResolverInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Bundle\ArgumentResolver; 15 | 16 | use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; 17 | use Symfony\Component\HttpKernel\Controller\ValueResolverInterface; 18 | 19 | if (interface_exists(ValueResolverInterface::class)) { 20 | /** @internal */ 21 | interface CompatibleValueResolverInterface extends ValueResolverInterface 22 | { 23 | } 24 | } else { 25 | /** @internal */ 26 | interface CompatibleValueResolverInterface extends ArgumentValueResolverInterface 27 | { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/argument_resolver.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/data_collector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/debug.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/graphql_mercure.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/http_cache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | %api_platform.http_cache.etag% 11 | %api_platform.http_cache.max_age% 12 | %api_platform.http_cache.shared_max_age% 13 | %api_platform.http_cache.vary% 14 | %api_platform.http_cache.public% 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/maker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/metadata/links.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/metadata/operation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/metadata/php.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/metadata/php_doc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/metadata/xml.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/openapi/yaml.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | yamlopenapi 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/problem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | jsonproblem 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/ramsey_uuid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/routing/api.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | api_platform.action.entrypoint 10 | 11 | true 12 | index 13 | 14 | index 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/routing/docs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | api_platform.action.documentation 10 | 11 | true 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/routing/errors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | api_platform.action.not_exposed 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/routing/genid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | api_platform.action.not_exposed 10 | true 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/routing/graphql/graphiql.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | api_platform.graphql.action.graphiql 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/routing/graphql/graphql.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | api_platform.graphql.action.entrypoint 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/routing/graphql/graphql_playground.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | api_platform.graphql.action.graphql_playground 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/routing/jsonld.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | api_platform.jsonld.action.context 10 | jsonld 11 | true 12 | 13 | [^.]+ 14 | jsonld 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/state/http_cache_purger.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/state/hydra.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/state/jsonapi.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | %api_platform.collection.order_parameter_name% 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/state/jsonld.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/state/mercure.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/state/security_validator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | post_validate 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/state/swagger_ui.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/symfony/jsonld.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/symfony/swagger_ui.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/config/symfony/uid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-ext-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-ext-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-ext-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-ext-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-ext-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-ext-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-ext-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-cyrillic-ext-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-ext-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-ext-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-ext-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-ext-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-ext-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-ext-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-ext-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-greek-ext-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-hebrew-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-ext-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-ext-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-ext-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-ext-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-ext-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-ext-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-ext-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-latin-ext-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-math-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-math-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-math-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-math-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-math-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-math-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-math-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-math-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-symbols-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-symbols-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-symbols-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-symbols-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-symbols-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-symbols-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-symbols-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-symbols-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-vietnamese-400-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-vietnamese-400-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-vietnamese-400-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-vietnamese-400-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-vietnamese-700-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-vietnamese-700-normal.woff -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-vietnamese-700-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/fonts/open-sans/files/open-sans-vietnamese-700-normal.woff2 -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/graphql-playground/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | overflow: hidden; 6 | } 7 | 8 | #root { 9 | height: 100%; 10 | } 11 | 12 | body { 13 | font-family: 'Open Sans', sans-serif; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | color: rgba(0,0,0,.8); 17 | line-height: 1.5; 18 | height: 100vh; 19 | letter-spacing: 0.53px; 20 | margin-right: -1px !important; 21 | } 22 | 23 | html, body, p, a, h1, h2, h3, h4, ul, pre, code { 24 | margin: 0; 25 | padding: 0; 26 | color: inherit; 27 | } 28 | 29 | a:active, a:focus, button:focus, input:focus { 30 | outline: none; 31 | } 32 | 33 | input, button, submit { 34 | border: none; 35 | } 36 | 37 | input, button, pre { 38 | font-family: 'Open Sans', sans-serif; 39 | } 40 | 41 | code { 42 | font-family: Consolas, monospace; 43 | } 44 | 45 | /*# sourceMappingURL=index.css.map*/ -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/init-common-ui.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const graphiQlLink = document.querySelector('.graphiql-link'); 4 | if (graphiQlLink) { 5 | graphiQlLink.addEventListener('click', e => { 6 | if (!e.target.hasAttribute('href')) { 7 | alert('GraphQL support is not enabled, see https://api-platform.com/docs/core/graphql/'); 8 | } 9 | }); 10 | } 11 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/init-graphql-playground.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', function(event) { 2 | var loadingWrapper = document.getElementById('loading-wrapper'); 3 | loadingWrapper.classList.add('fadeOut'); 4 | 5 | var root = document.getElementById('graphql-playground'); 6 | root.classList.add('playgroundIn'); 7 | 8 | var data = JSON.parse(document.getElementById('graphql-playground-data').innerText); 9 | GraphQLPlayground.init(root, { 10 | 'endpoint': data.entrypoint 11 | }) 12 | }); 13 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/init-redoc-ui.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | window.onload = () => { 4 | const data = JSON.parse(document.getElementById('swagger-data').innerText); 5 | 6 | Redoc.init(data.spec, {}, document.getElementById('swagger-ui')); 7 | }; 8 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/web.png -------------------------------------------------------------------------------- /src/Symfony/Bundle/Resources/public/webby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/api-platform/core/cb0dd58e445eb01834d198cb1937a98130a897ad/src/Symfony/Bundle/Resources/public/webby.png -------------------------------------------------------------------------------- /src/Symfony/Bundle/Test/ClientTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Bundle\Test; 15 | 16 | trait ClientTrait 17 | { 18 | public function withOptions(array $options): static 19 | { 20 | $clone = clone $this; 21 | $clone->defaultOptions = self::mergeDefaultOptions($options, $this->defaultOptions); 22 | 23 | return $clone; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Symfony/Bundle/Test/Constraint/ArraySubset.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Bundle\Test\Constraint; 15 | 16 | use PHPUnit\Framework\Constraint\Constraint; 17 | 18 | /** 19 | * Is used for phpunit >= 9. 20 | * 21 | * @internal 22 | */ 23 | final class ArraySubset extends Constraint 24 | { 25 | use ArraySubsetTrait; 26 | 27 | /** 28 | * {@inheritdoc} 29 | */ 30 | public function evaluate($other, string $description = '', bool $returnResult = false): ?bool 31 | { 32 | return $this->_evaluate($other, $description, $returnResult); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Symfony/EventListener/EventPriorities.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\EventListener; 15 | 16 | /** 17 | * Constants for common priorities. 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | final class EventPriorities 22 | { 23 | // kernel.request 24 | public const PRE_READ = 5; 25 | public const POST_READ = 3; 26 | public const PRE_DESERIALIZE = 3; 27 | public const POST_DESERIALIZE = 1; 28 | // kernel.view 29 | public const PRE_VALIDATE = 65; 30 | public const POST_VALIDATE = 63; 31 | public const PRE_WRITE = 33; 32 | public const POST_WRITE = 31; 33 | public const PRE_SERIALIZE = 17; 34 | public const POST_SERIALIZE = 15; 35 | public const PRE_RESPOND = 9; 36 | // kernel.response 37 | public const POST_RESPOND = 0; 38 | } 39 | -------------------------------------------------------------------------------- /src/Symfony/Maker/Resources/help/MakeStateProcessor.txt: -------------------------------------------------------------------------------- 1 | The %command.name% command generates a new API Platform state processor class. 2 | 3 | php %command.full_name% AwesomeStateProcessor 4 | 5 | If the argument is missing, the command will ask for the class name interactively. 6 | -------------------------------------------------------------------------------- /src/Symfony/Maker/Resources/help/MakeStateProvider.txt: -------------------------------------------------------------------------------- 1 | The %command.name% command generates a new API Platform state provider class. 2 | 3 | php %command.full_name% AwesomeStateProvider 4 | 5 | If the argument is missing, the command will ask for the class name interactively. 6 | -------------------------------------------------------------------------------- /src/Symfony/Maker/Resources/skeleton/StateProcessor.php.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | namespace ; 5 | 6 | use ApiPlatform\Metadata\Operation; 7 | use ApiPlatform\State\ProcessorInterface; 8 | 9 | class implements ProcessorInterface 10 | { 11 | public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): void 12 | { 13 | // Handle the state 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Symfony/Maker/Resources/skeleton/StateProvider.php.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | namespace ; 5 | 6 | use ApiPlatform\Metadata\Operation; 7 | use ApiPlatform\State\ProviderInterface; 8 | 9 | class implements ProviderInterface 10 | { 11 | public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null 12 | { 13 | // Retrieve the state from somewhere 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Symfony/Messenger/RemoveStamp.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Messenger; 15 | 16 | use Symfony\Component\Messenger\Stamp\StampInterface; 17 | 18 | /** 19 | * Hints that the resource in the envelope must be removed. 20 | * 21 | * @author Kévin Dunglas 22 | */ 23 | final class RemoveStamp implements StampInterface 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /src/Symfony/README.md: -------------------------------------------------------------------------------- 1 | # API Platform for Symfony 2 | 3 | Integration of [Symfony](https://symfony.com) with the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/symfony/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/Symfony/Security/Exception/AccessDeniedException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Security\Exception; 15 | 16 | use ApiPlatform\Metadata\Exception\HttpExceptionInterface; 17 | use Symfony\Component\Security\Core\Exception\AccessDeniedException as ExceptionAccessDeniedException; 18 | 19 | final class AccessDeniedException extends ExceptionAccessDeniedException implements HttpExceptionInterface 20 | { 21 | public function getStatusCode(): int 22 | { 23 | return 403; 24 | } 25 | 26 | public function getHeaders(): array 27 | { 28 | return []; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Symfony/Security/ResourceAccessCheckerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Security; 15 | 16 | use ApiPlatform\Metadata\ResourceAccessCheckerInterface as MetadataResourceAccessCheckerInterface; 17 | 18 | /** 19 | * Checks if the logged user has sufficient permissions to access the given resource. 20 | * 21 | * @deprecated use \ApiPlatform\Metadata\ResourceAccessCheckerInterface instead 22 | * 23 | * @author Kévin Dunglas 24 | */ 25 | interface ResourceAccessCheckerInterface extends MetadataResourceAccessCheckerInterface 26 | { 27 | } 28 | -------------------------------------------------------------------------------- /src/Symfony/Validator/ValidationGroupsGeneratorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Symfony\Validator; 15 | 16 | use Symfony\Component\Validator\Constraints\GroupSequence; 17 | 18 | /** 19 | * Generates validation groups for an object. 20 | * 21 | * @author Tomas Norkūnas 22 | */ 23 | interface ValidationGroupsGeneratorInterface 24 | { 25 | /** 26 | * @return GroupSequence|string[] 27 | */ 28 | public function __invoke(object $object): array|GroupSequence; 29 | } 30 | -------------------------------------------------------------------------------- /src/Validator/Exception/ConstraintViolationListAwareExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Validator\Exception; 15 | 16 | use ApiPlatform\Metadata\Exception\ExceptionInterface; 17 | use Symfony\Component\Validator\ConstraintViolationListInterface; 18 | 19 | /** 20 | * An exception which has a constraint violation list. 21 | */ 22 | interface ConstraintViolationListAwareExceptionInterface extends ExceptionInterface 23 | { 24 | /** 25 | * Gets constraint violations related to this exception. 26 | */ 27 | public function getConstraintViolationList(): ConstraintViolationListInterface; 28 | } 29 | -------------------------------------------------------------------------------- /src/Validator/README.md: -------------------------------------------------------------------------------- 1 | # API Platform - Validator 2 | 3 | The Validator component of the [API Platform](https://api-platform.com) framework. 4 | 5 | [Documentation](https://api-platform.com/docs/admin/validation/) 6 | 7 | > [!CAUTION] 8 | > 9 | > This is a read-only sub split of `api-platform/core`, please 10 | > [report issues](https://github.com/api-platform/core/issues) and 11 | > [send Pull Requests](https://github.com/api-platform/core/pulls) 12 | > in the [core API Platform repository](https://github.com/api-platform/core). 13 | -------------------------------------------------------------------------------- /src/Validator/ValidatorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | namespace ApiPlatform\Validator; 15 | 16 | use ApiPlatform\Validator\Exception\ValidationException; 17 | 18 | /** 19 | * Validates an item. 20 | * 21 | * @author Kévin Dunglas 22 | */ 23 | interface ValidatorInterface 24 | { 25 | /** 26 | * Validates an item. 27 | * 28 | * @throws ValidationException 29 | */ 30 | public function validate(object $data, array $context = []): void; 31 | } 32 | -------------------------------------------------------------------------------- /update-hydra-context.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | declare(strict_types=1); 13 | 14 | $opts = [ 15 | 'http' => [ 16 | 'method' => 'GET', 17 | 'header' => "User-Agent: Mozilla/5.0\r\n", 18 | ], 19 | ]; 20 | 21 | $context = stream_context_create($opts); 22 | $hydraContext = json_decode(file_get_contents('http://www.w3.org/ns/hydra/context.jsonld', false, $context), true); 23 | file_put_contents('src/JsonLd/HydraContext.php', '