{"id":15921285,"url":"https://github.com/dapplion/pyspec2openapi","last_synced_at":"2025-06-27T00:36:17.476Z","repository":{"id":215569727,"uuid":"739258942","full_name":"dapplion/pyspec2openapi","owner":"dapplion","description":"Convert ethereum/consensus-specs types into an OpenAPI types schema","archived":false,"fork":false,"pushed_at":"2024-01-08T04:34:08.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T12:22:31.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dapplion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-01-05T06:18:38.000Z","updated_at":"2024-01-07T02:51:28.000Z","dependencies_parsed_at":"2024-01-05T07:31:06.417Z","dependency_job_id":"b15c2a79-6f68-4d91-ba07-2995d1aa7cad","html_url":"https://github.com/dapplion/pyspec2openapi","commit_stats":null,"previous_names":["dapplion/pyspec2openapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dapplion/pyspec2openapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplion%2Fpyspec2openapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplion%2Fpyspec2openapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplion%2Fpyspec2openapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplion%2Fpyspec2openapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dapplion","download_url":"https://codeload.github.com/dapplion/pyspec2openapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplion%2Fpyspec2openapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262166180,"owners_count":23268995,"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-10-06T20:00:45.867Z","updated_at":"2025-06-27T00:36:17.457Z","avatar_url":"https://github.com/dapplion.png","language":"Python","readme":"# pyspec2openapi\n\nTool to convert the types defined in the Ethereum python specs https://github.com/ethereum/consensus-specs to an OpenAPI definition, for https://github.com/ethereum/beacon-APIs. This tool facilitates manteinance of the OpenAPI spec and follows the canonical JSON mapping from https://github.com/ethereum/consensus-specs/pull/3506\n\n## Usage\n\nInstall from PyPI\n\n```\npip install pyspec2openapi\n```\n\nCreate a `config.yml` file\n\n```yaml\nspec_version: v1.4.0-beta.5\nsources:\n  phase0:\n    - {spec: beacon-chain.md}\n    - {spec: validator.md}\n    - {file: extra_types/phase0.md}\n  altair:\n    - {spec: beacon-chain.md}\n    - {spec: validator.md}\n    - {spec: light-client/sync-protocol.md}\n    - {file: extra_types/altair.md}\n  bellatrix:\n    - {spec: beacon-chain.md}\n    - {spec: validator.md}\n    - {file: extra_types/bellatrix.md}\n  capella:\n    - {spec: beacon-chain.md}\n    - {spec: validator.md}\n    - {spec: light-client/sync-protocol.md}\n  deneb:\n    - {spec: polynomial-commitments.md}\n    - {spec: beacon-chain.md}\n    - {spec: validator.md}\n    - {spec: p2p-interface.md}\n    - {spec: light-client/sync-protocol.md}\n    - {file: extra_types/deneb.md}\ngenerate_blinded_types: [bellatrix, capella, deneb]\nignore_classnames:\n  - LightClientStore\nexclude_comments:\n  - '\\[New [^\\]]*\\]'\n  - '\\[Modified [^\\]]*\\]'\n```\n\n- `spec_version`: Specific Github tag from the `ethereum/consensus-specs` repo to fetch sources from\n- `sources`: Topologically sorted list of fork and files to fetch types from. This tool can topologically sort types within the same markdown file, but not across them.\n- `generate_blinded_types`: Auto-generate the types `BlindedBeaconBlockBody`, `BlindedBeaconBlock`, and `SignedBlindedBeaconBlock` for a specific set of forks.\n- `ignore_classnames`: Ignore container code blocks with this list of names\n- `exclude_comments`: Ignore comments for container properties that match any of this regex\n\nGenerate types spec\n\n```\npyspec2openapi config.yml out.yml\n```\n\nReview an example output with an [example config](./pyspec2openapi/tests/example_config.yml) in [./pyspec2openapi/tests/example_specs_out.yml](./pyspec2openapi/tests/example_specs_out.yml)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdapplion%2Fpyspec2openapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdapplion%2Fpyspec2openapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdapplion%2Fpyspec2openapi/lists"}