Skip to content

Commit

Permalink
Removing register compile target (#27)
Browse files Browse the repository at this point in the history
* remove register compile target, update readme
  • Loading branch information
jeevitha011 authored May 14, 2024
1 parent 5a58743 commit 5849f70
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 43 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.3 - 14.05.2024

### Changed

- Removed registering compile target

## Version 1.0.2 - 02.05.2024

### Fixed
Expand Down
24 changes: 2 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ The `@cap-js/openapi` is a package that provides support for OpenAPI document co
### Table of Contents

- [Requirements and Setup](#requirements-and-setup)
- [Generate OpenAPI document](#generate-openapi-document)
- [Contributing](#contributing)
- [Code of Conduct](#code-of-conduct)
- [Licensing](#licensing)
Expand All @@ -25,29 +24,10 @@ $ npm install @cap-js/openapi
### Usage

```sh
require("@cap-js/openapi").register()
const processor = require('@cap-js/asyncapi/lib/compile')
processor(csn)
```

## Generate OpenAPI document

### 1. Usage of programatic API

To invoke `cds compile --to openapi` programatically:

```sh
await cds.compile(<filename>).to.openapi()
```

### 2. Usage from CLI

Run the following command in the CLI to generate the OpenAPI document.

```sh
$ cds compile <filename> --to openapi
```

For more information, visit [capire](https://cap.cloud.sap/docs/advanced/openapi#cli)

## Contributing

This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/cap-js/openapi/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
Expand Down
17 changes: 0 additions & 17 deletions index.js

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cap-js/openapi",
"version": "1.0.2",
"version": "1.0.3",
"description": "CAP tool for OpenAPI",
"repository": {
"type": "git",
Expand All @@ -15,7 +15,7 @@
],
"author": "SAP SE (https://www.sap.com)",
"license": "SEE LICENSE IN LICENSE",
"main": "index.js",
"main": "lib/compile/index.js",
"files": [
"lib/",
"LICENSE"
Expand Down
3 changes: 1 addition & 2 deletions test/lib/compile/openapi.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require('../../..').register();
const toOpenApi = require('../../../lib/compile');
const cds = require('@sap/cds')
const { compile: { to: { openapi: toOpenApi } } } = cds

const someOpenApi = { openapi: '3.0.2', info: {}, servers: [{}], tags: [{}], paths: {}, components: {} }
const SCENARIO = Object.freeze({
Expand Down

0 comments on commit 5849f70

Please sign in to comment.