Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #261

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 3 additions & 30 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,12 @@ It's a pure JavaScript implementation, depending only on [`odata-csdl`](https://

## Installation

```sh
npm install odata-openapi
```

To install globally type

```sh
npm install -g odata-openapi
```

## Direct local usage of the CLI

Switch into the checkout project directory

```sh
npm install
npm run build
npm link
```

You can verify the installation using `npm list -g`, which should show the installed:

```sh
npm list -g
├── [email protected]
└── [email protected] -> .\..\..\your\path\odata-openapi
```

## Usage

Assuming you installed the script globally, and your XML metadata file is `MyMetadata.xml`, then
Expand All @@ -56,22 +34,17 @@ to get usage hints
Usage: odata-openapi3 <options> <source files>
Options:
--basePath base path (default: /service-root)
--description default description if none is annotated
-d, --diagram include YUML diagram
-h, --help show this info
--host host (default: localhost)
--levels maximum number of path segments
-o, --openapi-version 3.0.0 to 3.0.3 or 3.1.0 (default: 3.0.2)
-p, --pretty pretty-print JSON result
--scheme scheme (default: http)
-t, --target target file (default: source file basename + .openapi3.json)
--skipBatchPath skips the generation of the $batch path, (default: false)
-t, --target target file (default: source file basename + .openapi3.json)
--title default title if none is annotated
--description default description if none is annotated
```

If you installed the script locally, start it via

```sh
node lib/cli.js ...
```

## Supported Annotations
Expand Down