gothmock

command module
v0.0.0-...-b4b6aaa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2021 License: MIT Imports: 1 Imported by: 0

README

gothmock

Gothmock is a CLI tool to mock APIs from API specification files. It only supports OpenAPI 3 for now and is a WIP project in a very early stage.

Installing:

go install github.com/renanferr/gothmock

Usage:

The only required arg is the path to the spec file. This can be an OS filepath or a URI.

Flags may also be specified to determine in which port the server will listen and which response status and Content-type from the specification file should be used once a request is made to a valid path.

  • Default Port: :6666
  • Default Status Code: 200 ("OK")
  • Default Content-type: "application/json"
Usage Examples:
$ gothmock openapi3 ./example/openapi3/example.yml
$ gothmock openapi3 https://raw.githubusercontent.com/renanferr/gothmock/master/example/openapi3/example.yml --port 8080 --status 500 --content application/json

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL