{"id":23785919,"url":"https://github.com/apioo/psx-api","last_synced_at":"2025-10-07T21:03:54.952Z","repository":{"id":45291977,"uuid":"55149439","full_name":"apioo/psx-api","owner":"apioo","description":"TypeAPI parser and SDK code generator","archived":false,"fork":false,"pushed_at":"2025-09-27T09:35:26.000Z","size":1659,"stargazers_count":36,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-27T11:28:08.279Z","etag":null,"topics":["code-generator","openapi","php","swagger","typeapi"],"latest_commit_sha":null,"homepage":"https://typeapi.org/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apioo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"chriskapp","patreon":"fusio","custom":"https://www.paypal.me/fusioapi"}},"created_at":"2016-03-31T12:39:05.000Z","updated_at":"2025-09-27T09:29:07.000Z","dependencies_parsed_at":"2022-09-02T14:11:37.352Z","dependency_job_id":"75b31410-6cc2-4727-89ef-cdc8def0b474","html_url":"https://github.com/apioo/psx-api","commit_stats":{"total_commits":546,"total_committers":3,"mean_commits":182.0,"dds":0.08791208791208793,"last_synced_commit":"8e815b6006315566ef9f227525869206732fced4"},"previous_names":[],"tags_count":193,"template":false,"template_full_name":null,"purl":"pkg:github/apioo/psx-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apioo","download_url":"https://codeload.github.com/apioo/psx-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-api/sbom","scorecard":{"id":202815,"data":{"date":"2025-08-11","repo":{"name":"github.com/apioo/psx-api","commit":"5a8fa19b8b7bd39f599a67cd485703e1aa274448"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/apioo/psx-api/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/apioo/psx-api/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/apioo/psx-api/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/apioo/psx-api/ci.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-16T23:07:07.713Z","repository_id":45291977,"created_at":"2025-08-16T23:07:07.713Z","updated_at":"2025-08-16T23:07:07.713Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278846420,"owners_count":26056105,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["code-generator","openapi","php","swagger","typeapi"],"created_at":"2025-01-01T14:09:43.235Z","updated_at":"2025-10-07T21:03:54.926Z","avatar_url":"https://github.com/apioo.png","language":"PHP","funding_links":["https://github.com/sponsors/chriskapp","https://patreon.com/fusio","https://www.paypal.me/fusioapi"],"categories":[],"sub_categories":[],"readme":"\n# API\n\nThis library provides an attribute parser to dynamically generate a [TypeAPI](https://typeapi.org/) specification\nfrom any controller (code-first). Based on the specification it is then possible to generate client SDKs or\nan OpenAPI specification.\n\nWe provide also a hosted version of this [code generator](https://typeapi.org/generator).\nFor more integration options you can also take a look at the [SDKgen](https://sdkgen.app/) project\nwhich provides a CLI binary or GitHub action to integrate the code generator.\n\n## Usage\n\nThe root model object is called a `Specification` which contains `Operations` and `Definitions`. Each operation\nmaps to a specific REST API endpoint and the definitions represent the schemas to describe the JSON request or response\npayload.\n\n### Framework\n\nYou can use PHP attributes to describe the structure of your endpoints. You can then use the attribute parser (`PSX\\Api\\Parser\\Attribute`)\nto automatically generate a specification for your controller. A controller class could then look like:\n\n```php\n\u003c?php\n\nclass MyController\n{\n    #[Get]\n    #[Path('/my/endpoint/:id')]\n    public function getModel(#[Param] int $id, #[Query] int $year): \\My\\Response\\Model\n    {\n        // @TODO implement\n    }\n    \n    #[Post]\n    #[Path('/my/endpoint')]\n    public function insertModel(#[Body] \\My\\Request\\Model $model): \\My\\Response\\Model\n    {\n        // @TODO implement\n    }\n}\n\n```\n\nThis would be enough for the API component to generate either an OpenAPI specification or a client SDK.\nNote this library only needs the meta information, if you can get those meta information at your framework in another\nway you can also implement a custom `ParserInterface`.\n\n### Standalone\n\nBeside the framework integration you can use this component also to simply parse existing TypeAPI specification and\ngenerate specific output. The following is a simple example how to use the PHP API and how to generate code.\n\n```php\n\u003c?php\n\n// use the API manager to obtain a specification from different sources\n$manager = new \\PSX\\Api\\ApiManager(new \\PSX\\Schema\\SchemaManager());\n\n// reads the TypeAPI specification and generates a specification\n$specification = $manager-\u003egetApi('./typeapi.json');\n\n// contains all schema type definitions\n$definitions = $specification-\u003egetDefinitions();\n\n// returns the resource foo from the specification\n$operation = $specification-\u003egetOperations()-\u003eget('my.operation');\n\n// returns all available arguments\n$operation-\u003egetArguments();\n\n// returns the return type\n$operation-\u003egetReturn();\n\n// returns all exceptions which are described\n$operation-\u003egetThrows();\n\n// returns the assigned HTTP method\n$operation-\u003egetMethod();\n\n// returns the assigned HTTP path\n$operation-\u003egetPath();\n\n// creates a PHP client which consumes the defined operations\n$registry = \\PSX\\Api\\GeneratorFactory::fromLocal()-\u003efactory();\n$generator = $registry-\u003egetGenerator(\\PSX\\Api\\Repository\\LocalRepository::CLIENT_PHP)\n\n$source = $generator-\u003egenerate($resource);\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapioo%2Fpsx-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapioo%2Fpsx-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapioo%2Fpsx-api/lists"}