Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevitha011 committed May 2, 2024
1 parent eac0e99 commit 5a58743
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ 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.1 - 02.03.2024
## Version 1.0.2 - 02.05.2024

### Fixed

- Bug fixes

## Version 1.0.0 - 02.03.2024
## Version 1.0.1 - 02.05.2024

### Fixed

- Bug fixes

## Version 1.0.0 - 02.05.2024

### Added

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $ npm install @cap-js/openapi
### Usage

```sh
require("@cap-js/openapi").registerOpenapiCompileTarget()
require("@cap-js/openapi").register()
```

## Generate OpenAPI document
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ function _lazyRegisterCompileTarget() {
return value
}

const registerOpenapiCompileTarget = () => {
const register = () => {
Object.defineProperty(cds.compile.to, "openapi", {
get: _lazyRegisterCompileTarget,
configurable: true
})
}


module.exports = { registerOpenapiCompileTarget }
module.exports = { register }
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cap-js/openapi",
"version": "1.0.1",
"version": "1.0.2",
"description": "CAP tool for OpenAPI",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion test/lib/compile/openapi.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require('../../..').registerOpenapiCompileTarget();
require('../../..').register();
const cds = require('@sap/cds')
const { compile: { to: { openapi: toOpenApi } } } = cds

Expand Down

0 comments on commit 5a58743

Please sign in to comment.