{"id":19561833,"url":"https://github.com/valantic/pimcore-api-documentation","last_synced_at":"2025-02-26T08:45:10.142Z","repository":{"id":211091987,"uuid":"728192695","full_name":"valantic/pimcore-api-documentation","owner":"valantic","description":"Pimcore API Documentation Bundle","archived":false,"fork":false,"pushed_at":"2024-04-10T11:24:42.000Z","size":373,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-14T12:52:20.275Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valantic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-06T12:30:29.000Z","updated_at":"2024-04-15T13:59:13.493Z","dependencies_parsed_at":null,"dependency_job_id":"e934f495-a0ba-44ca-8a67-ae3baecefdbf","html_url":"https://github.com/valantic/pimcore-api-documentation","commit_stats":null,"previous_names":["valantic/pimcore-api-documentation"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valantic%2Fpimcore-api-documentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valantic%2Fpimcore-api-documentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valantic%2Fpimcore-api-documentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valantic%2Fpimcore-api-documentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valantic","download_url":"https://codeload.github.com/valantic/pimcore-api-documentation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240822608,"owners_count":19863302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T05:12:40.169Z","updated_at":"2025-02-26T08:45:10.101Z","avatar_url":"https://github.com/valantic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pimcore API documentation bundle\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/valantic/pimcore-api-documentation.svg?style=flat-square)](https://packagist.org/packages/valantic/pimcore-api-documentation)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![PHP Checks](https://github.com/valantic/pimcore-api-documentation/actions/workflows/phpstan.yml/badge.svg)](https://github.com/valantic/pimcore-api-documentation/actions/workflows/phpstan.yml)\n\nThis package is developed by [valantic CEC Schweiz](https://www.valantic.com/en/services/digital-business/) and is under active development.\n\nBundle is used for generating API documentation based on API controllers.\n\n## Requirements\n\n- Pimcore \u003e= 11.0.0\n\n## Installation\n\n1. `composer require valantic/pimcore-api-documentation`\n2. Add `ValanticPimcoreApiDocumentationBundle` to `config/bundles.php`\n\n\n## Usage\n\n```php\nclass ProductController implements \\Valantic\\PimcoreApiDocumentationBundle\\Http\\Controller\\ApiControllerInterface\n{\n    use \\Valantic\\PimcoreApiDocumentationBundle\\Controller\\ApiControllerTrait;\n\n    #[Route(path: '/product', name: 'rest_api_product_create', methods: Request::METHOD_POST)]\n    public function create(ProductCreateRequest $request): ProductCreateResponse|\\Valantic\\PimcoreApiDocumentationBundle\\Http\\Response\\BadRequestResponse\n    {\n        $errors = $this-\u003evalidateRequest($request);\n\n        if (count($errors) !== 0) {\n            return new \\Valantic\\PimcoreApiDocumentationBundle\\Http\\Response\\BadRequestResponse($errors);\n        }\n\n        return new ProductCreateResponse(/* ... */);\n    }\n}\n\nuse Symfony\\Component\\Validator\\Constraints as Assert;\n\nclass ProductCreateRequest implements \\Valantic\\PimcoreApiDocumentationBundle\\Http\\Request\\Contracts\\HasJsonPayload\n{\n    #[Assert\\NotBlank]\n    public ?string $name = null;\n\n    #[Assert\\NotBlank]\n    public ?string $description = null;\n}\n\nclass ProductCreateResponse implements \\Valantic\\PimcoreApiDocumentationBundle\\Http\\Response\\ApiResponseInterface\n{\n    public static function status(): int\n    {\n        return \\Symfony\\Component\\HttpFoundation\\Response::HTTP_CREATED;\n    }\n\n    public static function getDtoClass(): string|false\n    {\n        return ProductCreateDto::class;\n    }\n}\n\nclass ProductCreateDto\n{\n    public function __construct(\n        public ?int $id,\n    ) {}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalantic%2Fpimcore-api-documentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalantic%2Fpimcore-api-documentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalantic%2Fpimcore-api-documentation/lists"}