Skip to content

Commit

Permalink
Add some additional features, add release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgtaylor committed Jul 25, 2018
1 parent 075e4bd commit 2543f16
Show file tree
Hide file tree
Showing 7 changed files with 284 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
vendor
logo.png
apisprout*.zip
apisprout*.xz
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Add unreleased items here.

## [1.0.0] - 2018-07-24
- Initial release.
21 changes: 18 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@
[[constraint]]
name = "gopkg.in/yaml.v2"
version = "2.2.1"

[[constraint]]
name = "github.com/gobwas/glob"
version = "0.2.3"
49 changes: 40 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,51 @@
<img src="https://user-images.githubusercontent.com/106826/43119494-78be9224-8ecb-11e8-9d1a-9fc6f3014b91.png" width="300" alt="API Sprout"/>

A simple, quick, cross-platform API mock server that returns examples specified in an OpenAPI 3.x document. Usage is simple:
A simple, quick, cross-platform API mock server that returns examples specified in an API description document. Features include:

- OpenAPI 3.x support
- Load from a URL or local file
- Accept header content negotiation
- Prefer header to select response to test specific cases
- Server name validation (enabled with `--validate-server`)
- Request parameter & body validation (enabled with `--validate-request`)
- Configuration via files, environment, or commandline flags

Usage is simple:

```sh
# Load from a local file
apisprout my-api.yaml

# Load from a URL
apisprout https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/api-with-examples.yaml
```

## Installation

Download the appropriate binary from the [releases](https://github.com/danielgtaylor/apisprout/releases) page.

Alternatively, you can use `go get`:

```sh
go get github.com/danielgtaylor/apisprout
```

## ToDo
## Contributing

Contributions are very welcome. Please open a tracking issue or pull request and we can work to get things merged in.

## Release Process

The following describes the steps to make a new release of API Sprout.

- [x] OpenAPI 3.x support
- [x] Return defined examples
- [ ] Validate request payload
- [ ] Take `Accept` header into account to return the right media type
- [ ] Generate fake data from schema if no example is available
- [ ] Release binaries for Windows / Mac / Linux
- [ ] Public Docker image
1. Merge open PRs you want to release.
1. Select a new semver version number (major/minor/patch depending on changes).
1. Update `CHANGELOG.md` to describe changes.
1. Create a commit for the release.
1. Tag the commit with `git tag -a -m 'Tagging x.y.z release' vx.y.z`.
1. Build release binaries with `./release.sh`.
1. Push the commit and tags.
1. Upload the release binaries.

## License

Expand Down
Loading

0 comments on commit 2543f16

Please # to comment.