{"id":37073649,"url":"https://github.com/kazuki/pyramid-oas3","last_synced_at":"2026-01-14T08:38:49.634Z","repository":{"id":62582925,"uuid":"112933976","full_name":"kazuki/pyramid-oas3","owner":"kazuki","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-25T13:42:43.000Z","size":70,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-02T07:58:25.266Z","etag":null,"topics":["openapi","openapi-validation","openapi3","pyramid","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/kazuki.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}},"created_at":"2017-12-03T14:18:57.000Z","updated_at":"2019-04-26T06:43:22.000Z","dependencies_parsed_at":"2022-11-03T21:36:20.495Z","dependency_job_id":null,"html_url":"https://github.com/kazuki/pyramid-oas3","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/kazuki/pyramid-oas3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuki%2Fpyramid-oas3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuki%2Fpyramid-oas3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuki%2Fpyramid-oas3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuki%2Fpyramid-oas3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazuki","download_url":"https://codeload.github.com/kazuki/pyramid-oas3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuki%2Fpyramid-oas3/sbom","scorecard":{"id":552383,"data":{"date":"2025-08-11","repo":{"name":"github.com/kazuki/pyramid-oas3","commit":"fdadfc02b9551e235aa2d91582b6fe005da99025"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":-1,"reason":"no dependencies found","details":null,"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":"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"}},{"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: MIT License: 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":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: PYSEC-2018-49 / GHSA-rprw-h62v-c2w7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T11:14:27.352Z","repository_id":62582925,"created_at":"2025-08-20T11:14:27.352Z","updated_at":"2025-08-20T11:14:27.352Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:31:27.429Z","status":"ssl_error","status_checked_at":"2026-01-14T08:31:19.098Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["openapi","openapi-validation","openapi3","pyramid","python"],"created_at":"2026-01-14T08:38:48.986Z","updated_at":"2026-01-14T08:38:49.622Z","avatar_url":"https://github.com/kazuki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pyramid_oas3\n============\n\n[Pyramid](https://trypyramid.com/) Webアプリケーションに対して、\n[OpenAPI](https://www.openapis.org/) [3.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md)を利用した、\nリクエストの検証・パースを実施するライブラリです。\n\n[pyramid_swagger](https://github.com/striglia/pyramid_swagger)のOpenAPI 3.0対応版の様な位置づけです。\n\n設定項目\n--------\n\n* pyramid_oas3.validate_response: bool\n  * レスポンスのJSONも検証するかを設定します(デフォルト: False)\n* pyramid_oas3.fill_by_default: bool\n  * リクエストデータに対してOpenAPI定義で設定されたdefault値で埋めるかを設定します(デフォルト: False)\n* pyramid_oas3.response_reviver: Optional[Callable[[Union[int, str], JSON_TYPES], Union[JSON_TYPES, pyramid_oas3.UNDEFINED]]]\n  * JSON_TYPES: Union[int, float, str, bool, None, list, dict]\n  * [JSON.parse](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)のreviverと同様の処理を、\n    レスポンススキーマ検証実行前に適用するようにします\n  * デフォルト: None (reviverを適用しない)\n\n使い方\n------\n\n以下のように設定してpyramidに組み込みます\n\n```\nsettings = {\n    'pyramid.includes': 'pyramid_oas3',\n    'pyramid_oas3.schema': yaml.load(open('schema.yaml').read()),\n    'pyramid_oas3.validate_response': True,\n    'pyramid_oas3.fill_by_default': True,\n}\n```\n\n検証失敗時は以下の例外が返却されるので、\n適宜exception_view_configを設定してください\n\n* pyramid_oas3.ValidationErrors: リクエストデータのスキーマ検証失敗時\n* pyramid_oas3.ResponseValidationError: レスポンスデータのスキーマ検証失敗時\n* pyramid.httpexceptions.HTTPBadRequest: クエリ文字列のパース失敗時\n* pyramid.httpexceptions.HTTPNotAcceptable: リクエストのContentTypeに対応するものがスキーマにない\n＊pyramid.httpexceptions.HTTPUnauthorized: リクエストに認証情報がない\n\n以下にexception_view_configの例を示します\n\n```\nfrom pyramid.view import exception_view_config\n\n\n@exception_view_config(ValidationErrors)\ndef failed_request_validation(exc, request):\n    res = Response(str(exc))\n    res.status_int = 400\n    return res\n\n\n@exception_view_config(ResponseValidationError)\ndef failed_response_validation(exc, request):\n    res = Response(str(exc))\n    res.status_int = 500\n    return res\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazuki%2Fpyramid-oas3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazuki%2Fpyramid-oas3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazuki%2Fpyramid-oas3/lists"}