{"id":13515029,"url":"https://github.com/danielgtaylor/apisprout","last_synced_at":"2025-04-04T08:05:32.514Z","repository":{"id":33734463,"uuid":"142108855","full_name":"danielgtaylor/apisprout","owner":"danielgtaylor","description":"Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation","archived":false,"fork":false,"pushed_at":"2022-11-28T15:41:40.000Z","size":176,"stargazers_count":706,"open_issues_count":32,"forks_count":72,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T07:03:53.525Z","etag":null,"topics":["docker-image","examples","hacktoberfest","mock-server","openapi","openapi3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielgtaylor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-24T05:29:01.000Z","updated_at":"2025-03-20T00:10:41.000Z","dependencies_parsed_at":"2023-01-15T02:15:48.381Z","dependency_job_id":null,"html_url":"https://github.com/danielgtaylor/apisprout","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fapisprout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fapisprout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fapisprout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fapisprout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielgtaylor","download_url":"https://codeload.github.com/danielgtaylor/apisprout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247139463,"owners_count":20890234,"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":["docker-image","examples","hacktoberfest","mock-server","openapi","openapi3"],"created_at":"2024-08-01T05:01:05.504Z","updated_at":"2025-04-04T08:05:32.480Z","avatar_url":"https://github.com/danielgtaylor.png","language":"Go","funding_links":[],"categories":["Go","API Design Tools"],"sub_categories":[],"readme":"\u003cimg src=\"https://user-images.githubusercontent.com/106826/43119494-78be9224-8ecb-11e8-9d1a-9fc6f3014b91.png\" width=\"300\" alt=\"API Sprout\"/\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/danielgtaylor/apisprout)](https://goreportcard.com/report/github.com/danielgtaylor/apisprout) [![Build Status](https://travis-ci.org/danielgtaylor/apisprout.svg?branch=master)](https://travis-ci.org/danielgtaylor/apisprout) [![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/danielgtaylor/apisprout.svg)](https://github.com/danielgtaylor/apisprout/releases) [![Docker Pulls](https://img.shields.io/docker/pulls/danielgtaylor/apisprout.svg)](https://hub.docker.com/r/danielgtaylor/apisprout/)\n\nA simple, quick, cross-platform API mock server that returns examples specified in an API description document. Features include:\n\n- OpenAPI 3.x support\n  - Uses operation `examples` or generates examples from `schema`\n- Load from a URL or local file (auto reload with `--watch`)\n- CORS headers enabled by default\n- Accept header content negotiation\n  - Example: `Accept: application/*`\n- Prefer header to select response to test specific cases\n  - Example: `Prefer: status=409`\n- Server validation (enabled with `--validate-server`)\n  - Validates scheme, hostname/port, and base path\n  - Supports `localhost` out of the box\n  - Use the `--add-server` flag, in conjunction with `--validate-server`, to dynamically include more servers in the validation logic\n- Request parameter \u0026 body validation (enabled with `--validate-request`)\n- Configuration via:\n  - Files (`/etc/apisprout/config.json|yaml`)\n  - Environment (prefixed with `SPROUT_`, e.g. `SPROUT_VALIDATE_SERVER`)\n  - Commandline flags\n\nUsage is simple:\n\n```sh\n# Load from a local file\napisprout my-api.yaml\n\n# Validate server name and use base path\napisprout --validate-server my-api.yaml\n\n# Dynamically Include a new server / path in the validation\napisprout --add-server http://localhost:8080/mock --validate-server my-api.yaml\n\n# Load from a URL\napisprout https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/api-with-examples.yaml\n```\n\n## Docker Image\n\nA hosted [API Sprout Docker image](https://hub.docker.com/r/danielgtaylor/apisprout/) is provided that makes it easy to deploy mock servers or run locally. For example:\n\n```sh\ndocker pull danielgtaylor/apisprout\ndocker run -p 8000:8000 danielgtaylor/apisprout http://example.com/my-api.yaml\n```\n\nConfiguration can be passed via environment variables, e.g. setting `SPROUT_VALIDATE_REQUEST=1`, or by passing commandline flags. It is also possible to use a local API description file via [Docker Volumes](https://docs.docker.com/storage/volumes/):\n\n```\n# Remember to put the full path to local archive YAML in -v\ndocker run -p 8000:8000 -v $FULLPATH/localfile.yaml:/api.yaml danielgtaylor/apisprout /api.yaml\n```\n\n## Installation\n\nDownload the appropriate binary from the [releases](https://github.com/danielgtaylor/apisprout/releases) page.\n\nAlternatively, you can use `go get`:\n\n```sh\ngo get github.com/danielgtaylor/apisprout\n```\n\n## Extra Features\n\n### Remote Reload\n\nIf your API spec is loaded from a remote URL, you can live-reload it by hitting the `/__reload` endpoint.\n\n### Health Check\n\nA simple endpoint which returns status code `200` is available at `/__health`. This endpoint successfully returns `200` even if `--validate-server` is turned on, and the endpoint is being accessed from a non-validated host.\n\n## Contributing\n\nContributions are very welcome. Please open a tracking issue or pull request and we can work to get things merged in.\n\n## Release Process\n\nThe following describes the steps to make a new release of API Sprout.\n\n1. Merge open PRs you want to release.\n1. Select a new semver version number (major/minor/patch depending on changes).\n1. Update `CHANGELOG.md` to describe changes.\n1. Create a commit for the release.\n1. Tag the commit with `git tag -a -m 'Tagging x.y.z release' vx.y.z`.\n1. Build release binaries with `./release.sh`.\n1. Push the commit and tags.\n1. Upload the release binaries.\n\n## License\n\nCopyright \u0026copy; 2018-2019 Daniel G. Taylor\n\nhttp://dgt.mit-license.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielgtaylor%2Fapisprout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielgtaylor%2Fapisprout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielgtaylor%2Fapisprout/lists"}