0.0.0 • Published 5 years ago

loai3 v0.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

CircleCI codecov

loai3

OpenAPI 3 for lazy people.

tl;dr

This:

paths:
  /foo: 1

becomes:

openapi: 3.0.0
info:
  name: lazy
  version: 0.0.0
paths:
  /foo:
    get:
      responses:
        default:
          description: too lazy
          content:
            application-json:
              schema:
                type: integer
                format: int64
                default: 1

Why

Because sometimes you need to write an OpenAPI spec.

TODO

  • io-js for types
  • Stronger typing convention for x-??? extension syntax

How does it work?

Lazy OpenAPI in. Unlazy OpenAPI out. Feel free to mix and match.

Examples

See the tests.

Thanks

Thanks to metadevpro for providing the unlazy types.