{"id":26558104,"url":"https://github.com/timakro/apispec-oneofschema","last_synced_at":"2025-08-27T01:50:19.777Z","repository":{"id":57410904,"uuid":"137087000","full_name":"timakro/apispec-oneofschema","owner":"timakro","description":"Plugin for apispec providing support for Marshmallow-OneOfSchema schemas","archived":false,"fork":false,"pushed_at":"2025-07-28T06:08:06.000Z","size":41,"stargazers_count":11,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-28T06:27:44.926Z","etag":null,"topics":["apispec","marshmallow","openapi","polymorphsim","swagger"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/apispec-oneofschema/","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/timakro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2018-06-12T14:52:27.000Z","updated_at":"2025-07-28T06:08:10.000Z","dependencies_parsed_at":"2025-03-22T12:35:54.388Z","dependency_job_id":null,"html_url":"https://github.com/timakro/apispec-oneofschema","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":0.2222222222222222,"last_synced_commit":"614e71942f34597b6531caf81b7d8ffd4b3a12ca"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/timakro/apispec-oneofschema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timakro%2Fapispec-oneofschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timakro%2Fapispec-oneofschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timakro%2Fapispec-oneofschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timakro%2Fapispec-oneofschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timakro","download_url":"https://codeload.github.com/timakro/apispec-oneofschema/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timakro%2Fapispec-oneofschema/sbom","scorecard":{"id":885532,"data":{"date":"2025-08-11","repo":{"name":"github.com/timakro/apispec-oneofschema","commit":"6e0774d267e870ee844cc9771f76ba526a6c64d5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"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":"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":"Maintained","score":3,"reason":"3 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"Code-Review","score":2,"reason":"Found 6/22 approved changesets -- score normalized to 2","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":"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":"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.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt: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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T09:53:11.642Z","repository_id":57410904,"created_at":"2025-08-24T09:53:11.642Z","updated_at":"2025-08-24T09:53:11.642Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272277867,"owners_count":24905580,"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-08-26T02:00:07.904Z","response_time":60,"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":["apispec","marshmallow","openapi","polymorphsim","swagger"],"created_at":"2025-03-22T12:22:32.777Z","updated_at":"2025-08-27T01:50:19.749Z","avatar_url":"https://github.com/timakro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apispec-oneofschema\n\nPlugin for apispec providing support for Marshmallow-OneOfSchema schemas\n\nCan only be used with OpenAPI version 3.0.0 or greater which introduced a\nname to definition mapping for the discriminator.\n\n## Example\n\n```python\nfrom apispec import APISpec\nfrom marshmallow import Schema, fields\nfrom marshmallow_oneofschema import OneOfSchema\nfrom apispec_oneofschema import MarshmallowPlugin\n\nclass TreeSchema(Schema):\n    leaves = fields.Int(required=True)\n\nclass FlowerSchema(Schema):\n    blooming = fields.Bool(required=True)\n\nclass PlantSchema(OneOfSchema):\n    type_schemas = {\n        'tree': TreeSchema,\n        'flower': FlowerSchema\n    }\n\n    # def get_obj_type(self, obj):\n    #   ...\n\nspec = APISpec(\n    title='Botany',\n    version='1.0.0',\n    openapi_version='3.0.0',\n    plugins=[\n        MarshmallowPlugin(),\n    ]\n)\nspec.components.schema('Plant', schema=PlantSchema)\nprint(spec.to_yaml())\n```\n\nResulting OpenAPI spec:\n\n```yaml\ncomponents:\n  parameters: {}\n  responses: {}\n  schemas:\n    Flower:\n      properties:\n        blooming: {type: boolean}\n      required: [blooming]\n      type: object\n    Plant:\n      discriminator:\n        mapping: {flower: '#/components/schemas/Flower', tree: '#/components/schemas/Tree'}\n        propertyName: type\n      oneOf:\n      - {$ref: '#/components/schemas/Flower'}\n      - {$ref: '#/components/schemas/Tree'}\n    Tree:\n      properties:\n        leaves: {format: int32, type: integer}\n      required: [leaves]\n      type: object\n  securitySchemes: {}\ninfo: {title: Botany, version: 1.0.0}\nopenapi: 3.0.0\npaths: {}\ntags: []\n```\n\n## Installation\n\n    pip install apispec-oneofschema\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimakro%2Fapispec-oneofschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimakro%2Fapispec-oneofschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimakro%2Fapispec-oneofschema/lists"}