{"id":26508372,"url":"https://github.com/timakro/apispec-swaggerinherit","last_synced_at":"2025-10-30T08:41:44.577Z","repository":{"id":57410907,"uuid":"137090242","full_name":"timakro/apispec-swaggerinherit","owner":"timakro","description":"Plugin for apispec adding support for Swagger-style inheritance using `allOf`","archived":false,"fork":false,"pushed_at":"2021-02-13T19:57:39.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T05:35:17.483Z","etag":null,"topics":["apispec","inheritance","marshmallow","openapi","swagger"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/apispec-swaggerinherit/","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}},"created_at":"2018-06-12T15:15:57.000Z","updated_at":"2021-02-13T19:57:41.000Z","dependencies_parsed_at":"2022-09-04T18:12:05.558Z","dependency_job_id":null,"html_url":"https://github.com/timakro/apispec-swaggerinherit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timakro%2Fapispec-swaggerinherit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timakro%2Fapispec-swaggerinherit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timakro%2Fapispec-swaggerinherit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timakro%2Fapispec-swaggerinherit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timakro","download_url":"https://codeload.github.com/timakro/apispec-swaggerinherit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244713299,"owners_count":20497626,"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":["apispec","inheritance","marshmallow","openapi","swagger"],"created_at":"2025-03-21T00:23:23.305Z","updated_at":"2025-10-30T08:41:39.533Z","avatar_url":"https://github.com/timakro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apispec-swaggerinherit\n\nPlugin for apispec adding support for Swagger-style inheritance using `allOf`\n\n## Example\n\n```python\nfrom apispec import APISpec\nfrom marshmallow import Schema, fields\n\nclass PetBaseSchema(Schema):\n    name = fields.Str(required=True)\n\nclass DogSchema(PetBaseSchema):\n    barks = fields.Bool(required=True)\n\nclass CatSchema(PetBaseSchema):\n    cuteness = fields.Int(required=True)\n\nspec = APISpec(\n    title='Pet shop',\n    version='1.0.0',\n    plugins=[\n        'apispec.ext.marshmallow',\n        'apispec_swaggerinherit'\n    ]\n)\nspec.definition('PetBase', schema=PetBaseSchema)\nspec.definition('Dog', schema=DogSchema)\nspec.definition('Cat', schema=CatSchema)\nprint(spec.to_yaml())\n```\n\nResulting OpenAPI spec:\n\n```yaml\ndefinitions:\n  Cat:\n    allOf:\n    - {$ref: '#/definitions/PetBase'}\n    - properties:\n        cuteness: {format: int32, type: integer}\n      required: [cuteness]\n      type: object\n  Dog:\n    allOf:\n    - {$ref: '#/definitions/PetBase'}\n    - properties:\n        barks: {type: boolean}\n      required: [barks]\n      type: object\n  PetBase:\n    properties:\n      name: {type: string}\n    required: [name]\n    type: object\ninfo: {title: Pet shop, version: 1.0.0}\nparameters: {}\npaths: {}\nswagger: '2.0'\ntags: []\n```\n\n## Installation\n\n    pip install apispec-swaggerinherit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimakro%2Fapispec-swaggerinherit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimakro%2Fapispec-swaggerinherit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimakro%2Fapispec-swaggerinherit/lists"}