From 674db4a64fbaa67a25adf43df76c32f8fbe28601 Mon Sep 17 00:00:00 2001 From: jeevitha011 <118245189+jeevitha011@users.noreply.github.com> Date: Tue, 14 May 2024 14:08:03 +0530 Subject: [PATCH] Minor change (#29) * minor changes --- CHANGELOG.md | 6 ++++++ README.md | 11 ++++++++--- index.js | 3 +++ package.json | 4 ++-- 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 index.js diff --git a/CHANGELOG.md b/CHANGELOG.md index b287a88..a53f729 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). The format is based on [Keep a Changelog](http://keepachangelog.com/). +## Version 1.0.4 - 14.05.2024 + +### Changed + +- Minor changes + ## Version 1.0.3 - 14.05.2024 ### Changed diff --git a/README.md b/README.md index fb14e67..326eed7 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,14 @@ $ npm install @cap-js/openapi ### Usage -```sh -const processor = require('@cap-js/asyncapi/lib/compile') -processor(csn) +```js +const cds = require('@sap/cds') +const { compile } = require('@cap-js/openapi') +``` + +```js +const csn = await cds.load(cds.env.folders.srv) +const openapiDocument = compile(csn) ``` ## Contributing diff --git a/index.js b/index.js new file mode 100644 index 0000000..ff3fe86 --- /dev/null +++ b/index.js @@ -0,0 +1,3 @@ +module.exports = { + compile: require('./lib/compile') +} \ No newline at end of file diff --git a/package.json b/package.json index 94c8d62..dfda3fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cap-js/openapi", - "version": "1.0.3", + "version": "1.0.4", "description": "CAP tool for OpenAPI", "repository": { "type": "git", @@ -15,7 +15,7 @@ ], "author": "SAP SE (https://www.sap.com)", "license": "SEE LICENSE IN LICENSE", - "main": "lib/compile/index.js", + "main": "index.js", "files": [ "lib/", "LICENSE"