{"id":26022121,"url":"https://github.com/go-openapi/spec","last_synced_at":"2026-03-03T02:09:27.507Z","repository":{"id":41501028,"uuid":"56421126","full_name":"go-openapi/spec","owner":"go-openapi","description":"openapi specification object model","archived":false,"fork":false,"pushed_at":"2024-05-10T10:01:50.000Z","size":3808,"stargazers_count":393,"open_issues_count":9,"forks_count":100,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-29T19:59:57.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/go-openapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security_scheme.go","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-17T05:48:22.000Z","updated_at":"2024-10-25T07:22:55.000Z","dependencies_parsed_at":"2023-02-09T20:15:54.559Z","dependency_job_id":"d08de6e9-aafd-4308-be6f-fc322228b50b","html_url":"https://github.com/go-openapi/spec","commit_stats":{"total_commits":263,"total_committers":41,"mean_commits":6.414634146341464,"dds":0.532319391634981,"last_synced_commit":"832384d4ee1b2aa2479009d732f42866b63ed5f6"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-openapi%2Fspec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-openapi%2Fspec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-openapi%2Fspec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-openapi%2Fspec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-openapi","download_url":"https://codeload.github.com/go-openapi/spec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242187638,"owners_count":20086217,"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":"2025-03-06T09:54:24.233Z","updated_at":"2025-12-30T02:02:16.997Z","avatar_url":"https://github.com/go-openapi.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# spec\n\n\u003c!-- Badges: status  --\u003e\n[![Tests][test-badge]][test-url] [![Coverage][cov-badge]][cov-url] [![CI vuln scan][vuln-scan-badge]][vuln-scan-url] [![CodeQL][codeql-badge]][codeql-url]\n\u003c!-- Badges: release \u0026 docker images  --\u003e\n\u003c!-- Badges: code quality  --\u003e\n\u003c!-- Badges: license \u0026 compliance --\u003e\n[![Release][release-badge]][release-url] [![Go Report Card][gocard-badge]][gocard-url] [![CodeFactor Grade][codefactor-badge]][codefactor-url] [![License][license-badge]][license-url]\n\u003c!-- Badges: documentation \u0026 support --\u003e\n\u003c!-- Badges: others \u0026 stats --\u003e\n[![GoDoc][godoc-badge]][godoc-url] [![Discord Channel][discord-badge]][discord-url] [![go version][goversion-badge]][goversion-url] ![Top language][top-badge] ![Commits since latest release][commits-badge]\n\n---\n\nThe object model for OpenAPI v2 specification documents.\n\n## Announcements\n\n* **2025-12-19** : new community chat on discord\n  * a new discord community channel is available to be notified of changes and support users\n  * our venerable Slack channel remains open, and will be eventually discontinued on **2026-03-31**\n\nYou may join the discord community by clicking the invite link on the discord badge (also above). [![Discord Channel][discord-badge]][discord-url]\n\nOr join our Slack channel: [![Slack Channel][slack-logo]![slack-badge]][slack-url]\n\n## Status\n\nAPI is stable.\n\n## Import this library in your project\n\n```cmd\ngo get github.com/go-openapi/spec\n```\n\n### FAQ\n\n* What does this do?\n\n\u003e 1. This package knows how to marshal and unmarshal Swagger API specifications into a golang object model\n\u003e 2. It knows how to resolve $ref and expand them to make a single root document\n\n* How does it play with the rest of the go-openapi packages ?\n\n\u003e 1. This package is at the core of the go-openapi suite of packages and [code generator](https://github.com/go-swagger/go-swagger)\n\u003e 2. There is a [spec loading package](https://github.com/go-openapi/loads) to fetch specs as JSON or YAML from local or remote locations\n\u003e 3. There is a [spec validation package](https://github.com/go-openapi/validate) built on top of it\n\u003e 4. There is a [spec analysis package](https://github.com/go-openapi/analysis) built on top of it, to analyze, flatten, fix and merge spec documents\n\n* Does this library support OpenAPI 3?\n\n\u003e No.\n\u003e This package currently only supports OpenAPI 2.0 (aka Swagger 2.0).\n\u003e There is no plan to make it evolve toward supporting OpenAPI 3.x.\n\u003e This [discussion thread](https://github.com/go-openapi/spec/issues/21) relates the full story.\n\u003e\n\u003e An early attempt to support Swagger 3 may be found at: https://github.com/go-openapi/spec3\n\n* Does the unmarshaling support YAML?\n\n\u003e Not directly. The exposed types know only how to unmarshal from JSON.\n\u003e\n\u003e In order to load a YAML document as a Swagger spec, you need to use the loaders provided by\n\u003e github.com/go-openapi/loads\n\u003e\n\u003e Take a look at the example there: https://pkg.go.dev/github.com/go-openapi/loads#example-Spec\n\u003e\n\u003e See also https://github.com/go-openapi/spec/issues/164\n\n* How can I validate a spec?\n\n\u003e Validation is provided by [the validate package](http://github.com/go-openapi/validate)\n\n* Why do we have an `ID` field for `Schema` which is not part of the swagger spec?\n\n\u003e We found jsonschema compatibility more important: since `id` in jsonschema influences\n\u003e how `$ref` are resolved.\n\u003e This `id` does not conflict with any property named `id`.\n\u003e\n\u003e See also https://github.com/go-openapi/spec/issues/23\n\n## Change log\n\nSee \u003chttps://github.com/go-openapi/spec/releases\u003e\n\n## References\n\n\u003chttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md\u003e\n\n## Licensing\n\nThis library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE).\n\n## Other documentation\n\n* [All-time contributors](./CONTRIBUTORS.md)\n* [Contributing guidelines](.github/CONTRIBUTING.md)\n* [Maintainers documentation](docs/MAINTAINERS.md)\n* [Code style](docs/STYLE.md)\n\n## Cutting a new release\n\nMaintainers can cut a new release by either:\n\n* running [this workflow](https://github.com/go-openapi/spec/actions/workflows/bump-release.yml)\n* or pushing a semver tag\n  * signed tags are preferred\n  * The tag message is prepended to release notes\n\n\u003c!-- Badges: status  --\u003e\n[test-badge]: https://github.com/go-openapi/spec/actions/workflows/go-test.yml/badge.svg\n[test-url]: https://github.com/go-openapi/spec/actions/workflows/go-test.yml\n[cov-badge]: https://codecov.io/gh/go-openapi/spec/branch/master/graph/badge.svg\n[cov-url]: https://codecov.io/gh/go-openapi/spec\n[vuln-scan-badge]: https://github.com/go-openapi/spec/actions/workflows/scanner.yml/badge.svg\n[vuln-scan-url]: https://github.com/go-openapi/spec/actions/workflows/scanner.yml\n[codeql-badge]: https://github.com/go-openapi/spec/actions/workflows/codeql.yml/badge.svg\n[codeql-url]: https://github.com/go-openapi/spec/actions/workflows/codeql.yml\n\u003c!-- Badges: release \u0026 docker images  --\u003e\n[release-badge]: https://badge.fury.io/gh/go-openapi%2Fspec.svg\n[release-url]: https://badge.fury.io/gh/go-openapi%2Fspec\n[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fspec.svg\n[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fspec\n\u003c!-- Badges: code quality  --\u003e\n[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/spec\n[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/spec\n[codefactor-badge]: https://img.shields.io/codefactor/grade/github/go-openapi/spec\n[codefactor-url]: https://www.codefactor.io/repository/github/go-openapi/spec\n\u003c!-- Badges: documentation \u0026 support --\u003e\n[doc-badge]: https://img.shields.io/badge/doc-site-blue?link=https%3A%2F%2Fgoswagger.io%2Fgo-openapi%2F\n[doc-url]: https://goswagger.io/go-openapi\n[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/spec\n[godoc-url]: http://pkg.go.dev/github.com/go-openapi/spec\n[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png\n[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM\n[slack-url]: https://goswagger.slack.com/archives/C04R30YMU\n[discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord\u0026label=discord\u0026color=blue\n[discord-url]: https://discord.gg/DrafRmZx\n\n\u003c!-- Badges: license \u0026 compliance --\u003e\n[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg\n[license-url]: https://github.com/go-openapi/spec/?tab=Apache-2.0-1-ov-file#readme\n\u003c!-- Badges: others \u0026 stats --\u003e\n[goversion-badge]: https://img.shields.io/github/go-mod/go-version/go-openapi/spec\n[goversion-url]: https://github.com/go-openapi/spec/blob/master/go.mod\n[top-badge]: https://img.shields.io/github/languages/top/go-openapi/spec\n[commits-badge]: https://img.shields.io/github/commits-since/go-openapi/spec/latest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-openapi%2Fspec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-openapi%2Fspec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-openapi%2Fspec/lists"}