You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`--target`, `-t`|`.`| Target directory where files will be generated. |
75
+
|`--dependency-base-spec`, `-b`| - | Name of the NPM artifact to use as the dependency base specification (e.g. @my-org/specification). |
76
+
77
+
The command will generate a directory with the same structure of the `design` command but will setup the repository to prepare the generation of 3 specification:
78
+
79
+
-`base` specification which is extended by the current specification
80
+
-`extension` specification bundling only the specification defined in the current project
81
+
-`merge` specification which is the merge of the `base` with `extension` specification.
This package exposes 3 different [OpenApi specifications](https://swagger.io/specification/) which can be used to use to generate an SDK or be referred in another specification.
4
+
5
+
- `<%- packageName %>/bundle/base.yam;`: The core the extension is based on.
6
+
- `<%- packageName %>/bundle/extension.yaml`: The extension specification which contains only the new endpoints .
7
+
- `<%- packageName %>/bundle/specification.yaml`: The merged specification of the base and the extension
8
+
9
+
## How to work on it
10
+
11
+
**Recommendations:**
12
+
13
+
- Code editor [Visual Studio Code](https://code.visualstudio.com/) with the recommended extension (proposed on start).
14
+
- [NodeJs](https://nodejs.org/) with a odd [LTS (or latest) version](https://nodejs.org/en/about/previous-releases).
15
+
16
+
**Setup:**
17
+
18
+
```shell
19
+
npm install
20
+
```
21
+
22
+
### Add dependency
23
+
24
+
```shell
25
+
npm install <artifact_name>
26
+
```
27
+
28
+
and refer to its models via config in the [manifest](https://github.com/AmadeusITGroup/otter/tree/main/docs/openapi/MANIFEST_CONFIGURATION.md):
29
+
30
+
```yaml
31
+
models:
32
+
<artifact_name>:
33
+
- models/first-model.yaml
34
+
- models/second-model.yaml
35
+
```
36
+
37
+
> [!NOTE]
38
+
> The complete documentation is available on [Dependency concept documentation](https://github.com/AmadeusITGroup/otter/tree/main/docs/openapi/DEPENDENCY_RESOLUTION_CONCEPT.md).
39
+
40
+
## Repository structure
41
+
42
+
The current repository has the following structure:
43
+
44
+
```text
45
+
<%- projectFolder %>/
46
+
├── .vscode/ # VsCode options and recommended extension
47
+
├── apis/ # List of the Apis to bundle in the final specification
48
+
├── models/ # Models to be referred locally and shared
49
+
├── responses/ # List of responses used in the APIs
0 commit comments