{"id":24071003,"url":"https://github.com/markrosemaker/openapi","last_synced_at":"2026-05-08T07:31:26.157Z","repository":{"id":257864731,"uuid":"868969721","full_name":"MarkRosemaker/openapi","owner":"MarkRosemaker","description":"Tools for parsing, formatting, validating, and programmatically enhancing OpenAPI specifications in Go.","archived":false,"fork":false,"pushed_at":"2026-05-05T04:02:21.000Z","size":1252,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-05T06:13:04.313Z","etag":null,"topics":["api","api-documentation","api-management","api-specification","api-tools","go","json","openapi","swagger","validation","yaml"],"latest_commit_sha":null,"homepage":"","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/MarkRosemaker.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":"security_requirement.go","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-07T13:51:53.000Z","updated_at":"2026-05-05T04:02:24.000Z","dependencies_parsed_at":"2024-10-27T14:34:08.116Z","dependency_job_id":"fb2e98b4-f5bf-43a2-8ce2-74bf41fdc1d2","html_url":"https://github.com/MarkRosemaker/openapi","commit_stats":null,"previous_names":["markrosemaker/openapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MarkRosemaker/openapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkRosemaker%2Fopenapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkRosemaker%2Fopenapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkRosemaker%2Fopenapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkRosemaker%2Fopenapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarkRosemaker","download_url":"https://codeload.github.com/MarkRosemaker/openapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkRosemaker%2Fopenapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32770979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"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":["api","api-documentation","api-management","api-specification","api-tools","go","json","openapi","swagger","validation","yaml"],"created_at":"2025-01-09T16:24:12.483Z","updated_at":"2026-05-08T07:31:26.103Z","avatar_url":"https://github.com/MarkRosemaker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" id=badges\u003e\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/MarkRosemaker/openapi.svg)](https://pkg.go.dev/github.com/MarkRosemaker/openapi)\n[![Go Report Card](https://goreportcard.com/badge/github.com/MarkRosemaker/openapi)](https://goreportcard.com/report/github.com/MarkRosemaker/openapi)\n![Code Coverage](https://img.shields.io/badge/coverage-96.4%25-brightgreen)\n[![License: Apache](https://img.shields.io/badge/License-Apache-yellow.svg)](./LICENSE)\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"OpenAPI Logo\" src=openapi-logo.svg width=500\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\n  Transform and master your API specs with ease.\n\u003c/h3\u003e\n\nPackage openapi provides a suite of tools for working with OpenAPI specifications, making it easier to parse, format, manipulate, and generate code from these specs. \n\nWhether you're looking to clean up existing API documentation or integrate API design into your development pipeline, this package is built to streamline your workflow.\n\n**This package is currently being utilized to format OpenAPI specifications in the [go-api-libs](https://github.com/go-api-libs) project.**\n\n## Introduction\n\nThe primary goals of this package are:\n\n- **Parsing** OpenAPI specifications into a structured format.\n- **Formatting** the parsed specifications, including sorting maps and merging duplicate content.\n- **Adding information programmatically** to the specifications.\n- **Marshalling** the modified specifications back into their original format.\n- **Utilizing** the parsed specification for code generation.\n\n## Features\n\n- **Comprehensive parsing** of OpenAPI specifications.\n- **Flexible formatting** options to improve readability and consistency.\n- **Ability to merge and deduplicate** content within specifications.\n- **Programmatic modification** of specifications before marshalling.\n- **Code generation capabilities** based on parsed specifications.\n\n## Usage\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/MarkRosemaker/openapi\"\n)\n\nfunc main() {\n    doc, err := openapi.LoadFromFile(\"path/to/openapi.json\") // or openapi.yaml\n    if err != nil {\n        fmt.Println(\"Error parsing spec:\", err)\n        return\n    }\n\n    if err := doc.Validate(); err != nil {\n        fmt.Println(\"Error validating spec:\", err)\n        return\n    }\n\n    // sort keys of each component in alphabetical order\n    doc.Components.SortMaps()\n\n\t// write an improved version of your spec\n    if err := doc.WriteToFile(\"path/to/openapi.json\"); err != nil {\n        fmt.Println(\"Error writing to file:\", err)\n        return\n    }\n}\n```\n\n## Additional Information\n\n- [**Go Reference**](https://pkg.go.dev/github.com/MarkRosemaker/openapi): The Go reference documentation for the errpath package.\n- [**Go Report Card**](https://goreportcard.com/report/github.com/MarkRosemaker/openapi): Check the code quality report.\n\n## Contributing\n\nIf you have any contributions to make, please submit a pull request or open an issue on the [GitHub repository](https://github.com/MarkRosemaker/openapi).\n\n## License\n\nThis project is licensed under the [Apache 2.0 License](./LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkrosemaker%2Fopenapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkrosemaker%2Fopenapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkrosemaker%2Fopenapi/lists"}