{"modulePath":"github.com/linuxsuren/api-testing","version":"v0.0.21","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package apispec\n\n## Functions\n\n```go\nfunc DownloadSwaggerData(output string, dw downloader.PlatformAwareOCIDownloader) (err error)\n```\n\n```go\nfunc GetProtoFiles() (files map[string]string, err error)\n```\n\n```go\nfunc GetSwaggerList() (swaggers []string)\n```\n\n```go\nfunc ParseFileToSwagger(dataFile string) (swagger *spec.Swagger, err error)\n```\n\n```go\nfunc ParseStreamToSwagger(stream io.Reader) (swagger *spec.Swagger, err error)\n```\n\n```go\nfunc ParseToSwagger(data []byte) (swagger *spec.Swagger, err error)\n```\n\n```go\nfunc ParseURLToSwagger(swaggerURL string) (swagger *spec.Swagger, err error)\n```\n\n```go\nfunc SwaggersHandler(w http.ResponseWriter, _ *http.Request,\n\t_ map[string]string)\n```\n\n## Types\n\n```go\ntype APICoverage interface {\n\tHaveAPI(path, method string) (exist bool)\n\tAPICount() (count int)\n}\n```\n\n```go\nfunc NewFakeAPISpec(apis [][]string) APICoverage\n```\nNewFakeAPISpec creates a new instance of fakeAPISpec\n\n```go\ntype SwaggerAPI struct {\n\tSwagger *spec.Swagger\n\tApiMap  map[string][]string\n}\n```\n\n```go\nfunc NewSwaggerAPI(swagger *spec.Swagger) *SwaggerAPI\n```\n\n```go\nfunc (s *SwaggerAPI) APICount() (count int)\n```\nAPICount return the count of APIs\n\n```go\nfunc (s *SwaggerAPI) HaveAPI(path, method string) (exist bool)\n```\nHaveAPI check if the swagger has the API. If the path is /api/v1/names/linuxsuren, then will match /api/v1/names/{name}\n\n","path":"github.com/linuxsuren/api-testing/pkg/apispec","name":"apispec","synopsis":"","isRedistributable":true}
