├── .github └── workflows │ └── test.yml ├── .gitignore ├── .golangci.toml ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── _examples └── echo │ ├── main.go │ └── swagger.yaml ├── assertions.go ├── assertions_test.go ├── doc.go ├── document.go ├── errors.go ├── fixtures ├── docs.json ├── invalid-doc.json └── invalid-path.json ├── go.mod ├── go.sum ├── middleware └── echo │ ├── assert.go │ └── assert_test.go ├── swagger.go ├── swagger_test.go └── testdata ├── TestAssertionsRequest_read_body ├── TestAssertionsResponse_read_body ├── TestRequestBody_success ├── TestRequestHeaders_no_headers ├── TestRequestHeaders_success ├── TestRequestMediaTypes_default_types ├── TestRequestMediaTypes_success ├── TestRequestQuery_no_query ├── TestRequestQuery_success ├── TestResponseBody_success ├── TestResponseHeaders_default ├── TestResponseHeaders_success ├── TestResponseMediaTypes_default_types └── TestResponseMediaTypes_success /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cover* 2 | vendor 3 | -------------------------------------------------------------------------------- /.golangci.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/.golangci.toml -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/README.md -------------------------------------------------------------------------------- /_examples/echo/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/_examples/echo/main.go -------------------------------------------------------------------------------- /_examples/echo/swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/_examples/echo/swagger.yaml -------------------------------------------------------------------------------- /assertions.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/assertions.go -------------------------------------------------------------------------------- /assertions_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/assertions_test.go -------------------------------------------------------------------------------- /doc.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/doc.go -------------------------------------------------------------------------------- /document.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/document.go -------------------------------------------------------------------------------- /errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/errors.go -------------------------------------------------------------------------------- /fixtures/docs.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/fixtures/docs.json -------------------------------------------------------------------------------- /fixtures/invalid-doc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/fixtures/invalid-doc.json -------------------------------------------------------------------------------- /fixtures/invalid-path.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/fixtures/invalid-path.json -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/go.sum -------------------------------------------------------------------------------- /middleware/echo/assert.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/middleware/echo/assert.go -------------------------------------------------------------------------------- /middleware/echo/assert_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/middleware/echo/assert_test.go -------------------------------------------------------------------------------- /swagger.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/swagger.go -------------------------------------------------------------------------------- /swagger_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/swagger_test.go -------------------------------------------------------------------------------- /testdata/TestAssertionsRequest_read_body: -------------------------------------------------------------------------------- 1 | {"id": 1, "name": "doggo"} -------------------------------------------------------------------------------- /testdata/TestAssertionsResponse_read_body: -------------------------------------------------------------------------------- 1 | [{"id": 1, "name": "doggo"}] -------------------------------------------------------------------------------- /testdata/TestRequestBody_success: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/testdata/TestRequestBody_success -------------------------------------------------------------------------------- /testdata/TestRequestHeaders_no_headers: -------------------------------------------------------------------------------- 1 | (assert.Headers) { 2 | } 3 | -------------------------------------------------------------------------------- /testdata/TestRequestHeaders_success: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/testdata/TestRequestHeaders_success -------------------------------------------------------------------------------- /testdata/TestRequestMediaTypes_default_types: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/testdata/TestRequestMediaTypes_default_types -------------------------------------------------------------------------------- /testdata/TestRequestMediaTypes_success: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/testdata/TestRequestMediaTypes_success -------------------------------------------------------------------------------- /testdata/TestRequestQuery_no_query: -------------------------------------------------------------------------------- 1 | (assert.Query) { 2 | } 3 | -------------------------------------------------------------------------------- /testdata/TestRequestQuery_success: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/testdata/TestRequestQuery_success -------------------------------------------------------------------------------- /testdata/TestResponseBody_success: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/testdata/TestResponseBody_success -------------------------------------------------------------------------------- /testdata/TestResponseHeaders_default: -------------------------------------------------------------------------------- 1 | (assert.Headers) { 2 | } 3 | -------------------------------------------------------------------------------- /testdata/TestResponseHeaders_success: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/testdata/TestResponseHeaders_success -------------------------------------------------------------------------------- /testdata/TestResponseMediaTypes_default_types: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/testdata/TestResponseMediaTypes_default_types -------------------------------------------------------------------------------- /testdata/TestResponseMediaTypes_success: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/faabiosr/openapi-assert/HEAD/testdata/TestResponseMediaTypes_success --------------------------------------------------------------------------------