oasdiff
kin-openapi
oasdiff | kin-openapi | |
---|---|---|
12 | 6 | |
584 | 2,397 | |
4.8% | 1.9% | |
9.2 | 8.5 | |
3 days ago | 1 day ago | |
Go | Go | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
oasdiff
- FLaNK AI for 11 March 2024
-
Serverless APIs: Auto-Generate OpenAPI Docs & CI/CD Protections
We will use an open-source GitHub action, oasdiff-action, based on the tool ‘oasdiff.’
-
How Can You Achieve Continuous Deployment for *APIs*?
Nice, Have you come across this tool oasdiff from the article? It may help with detect API breaking changes in swagger
-
How to prevent breaking API changes with API Gateway
While you might wish that pull request reviewers would spot any breaking changes, relying solely on this method is not certain and might lead to failure eventually. If you have OpenAPI/Swagger documentation for your APIs, these can be version-controlled and included in a CI pipeline. APISIX doesn't natively support direct integration with version control systems like Git for API specification changes. However, you can set up a process outside APISIX. Tools like Oasdiff or Bump can identify changes in API specs, and trigger a CI pipeline (add GitHub Action) that runs tests against the route endpoints in APISIX to ensure no breaking changes are introduced.
- Would you like to be notified when your API provider makes a breaking change?
-
Testing for Breaking Changes in Fastify APIs
Now that we have a way to lookup our API’s behavior with Git, we can start testing for breaking changes between versions of our API. We’ll be using Optic (an open source tool I created) to do just that. If you are looking for other options I recommend https://github.com/OpenAPITools/openapi-diff or https://github.com/Tufin/oasdiff.
-
Ask HN: Non-Breaking API deprecation in OpenAPI spec – what do you think?
2. Delete the API at the sunset date or later
People seem to want such a process in order to prevent breaking-changes.
I wrote a diff tool for OpenAPI spec which supports detection of breaking-changes and I recently extended it to support this process and a bit more.
Now I'm looking for feedback.
Proposed Solution (currently in Beta): https://github.com/Tufin/oasdiff#non-breaking-removal-of-deprecated-resources
Related requests:
- A diff tool and Go module for OpenAPI Specification
- OpenAPI Diff
kin-openapi
-
Create Production-Ready SDKs With gRPC Gateway
We'll use the excellent kin-openapi Go library to convert the OpenAPI 2.0 schema to OpenAPI 3.0.
-
OpenAPI Generator allows generation of API client libraries from OpenAPI Specs
What is your language?
I've found kin-openapi to be good for Go:
https://github.com/getkin/kin-openapi
-
swaggo/swag alternative, but should generate OpenAPI 3.0 spec file
I recently used https://github.com/getkin/kin-openapi openapi2 and openapi2conv to convert the v2 yaml to v3 yaml.
-
Any good OpenAPI 3.x spec generator for a Go REST API?
This might not be very helpful, but I've have found every "generate spec from code" package to be limited sooner or later, and that's across languages. I finally settled on writing the spec file by hand, linting it in CI using openapi-cli, and using kin-openapi in Go tests to ensure responses match their schema.
-
What are your favorite packages to use?
oklog/ulid to generate IDs. coreos/go-oidc for validating JWTs I get from auth. google/go-cmp for comparing structs in tests (unless the project is already using Testify). spf13/pflag because life's too short for Go's flag handling. getkin/kin-openapi for validating reqests/responses against my OpenAPI spec (in tests).
-
Do you use swagger to generate backends?
Then define the corresponding YAML/JSON specification (again manually) either using Swagger 2.0 (with go-swagger) or OpenAPI 3 (with kin-openapi), and
What are some alternatives?
openapi-preprocessor - An authoring tool for OpenAPI specifications
GoSwagger - Swagger 2.0 implementation for go
apiclarity - An API security tool to capture and analyze API traffic, test API endpoints, reconstruct Open API specification, and identify API security risks.
chi - lightweight, idiomatic and composable router for building Go HTTP services
openapi-diff - Utility for comparing two OpenAPI specifications.
oapi-codegen - Generate Go client and server boilerplate from OpenAPI 3 specifications
openapi-generator-go - An opinionated OpenAPI v3 code generator for Go. Use this to generate API models and router scaffolding.
Gin - Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
api-firewall - Fast and light-weight API proxy firewall for request and response validation by OpenAPI specs.
swagger2markup - A Swagger to AsciiDoc or Markdown converter to simplify the generation of an up-to-date RESTful API documentation by combining documentation that’s been hand-written with auto-generated API documentation.
Optic - OpenAPI linting, diffing and testing. Optic helps prevent breaking changes, publish accurate documentation and improve the design of your APIs.
openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)