{"repo":"smartrecruiters/openapi-first","free":true,"listed":false,"github":"https://github.com/smartrecruiters/openapi-first","clone":"git clone https://github.com/smartrecruiters/openapi-first.git","description":"Start your node REST app with designing API first!","language":"JavaScript","stars":40,"topics":["openapi","openapi-specification","connect","oas3","openapi3"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"@smartrecruiters/openapi-first [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Node.js Version][node-version-image]][node-version-url] [![Licence][license-image]][license-url] [![Build][travis-image]][travis-url] Start your node REST app with designing API first! Is it for you? If you: - use OpenAPI Specification 3.0 to document your REST APIs written in node.js, - like design first approach regarding REST APIs - want your specification to be single source of truth of your API, - want to handle validation and parsing of requests query, path, body, content-type in a unified manner for all API endpoints, then @smartrecruiters/openapi-first is what you are looking for! This module initializes your API connect-style application with specification in OpenAPI Specification 3.0 format. How to start Let's say you have specification in OpenAPI Specification 3.0 in spec.json : Now you can implement connect-style middleware with \"business logic\" in greeting/hello.js : Now, let's make an app.js file: We can now run the application: To verify it's working, let's hit the endpoint: The response should be 200 with body: openapi middlewares You can use one of the middlewares under @smartrecruiters/middlewares/ or create your own. Such middlewares will be applied to connect-style app for each operation as they are specification and operation aware. For instance, @smartrecruiters/middlewares/query/validate middleware will be applied to any and only ope","default_branch":null,"files":null,"tree":[],"storefront":"/r/smartrecruiters","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/smartrecruiters/openapi-first/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}