Skip to content

Commit 5925306

Browse files
Update Readme
Update for the new project structure.
1 parent b087172 commit 5925306

File tree

1 file changed

+43
-15
lines changed

1 file changed

+43
-15
lines changed

Readme.md

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,71 @@
22

33
[![Validate OpenAPI Spec Files](https://github.com/Software-Hardware-Integration-Lab/OpenAPI/actions/workflows/Validate.yml/badge.svg)](https://github.com/Software-Hardware-Integration-Lab/OpenAPI/actions/workflows/Validate.yml)
44

5-
This repository contains the OpenAPI specifications for SHI International Corp's APIs. These specifications are used to define the structure and behavior of our APIs, enabling seamless integration and interaction between different services within the SHI ecosystem.
5+
This repository contains the OpenAPI specifications for SHI International Corp's APIs. These specifications define the structure and behavior of our APIs, enabling seamless integration and interaction between different services within the SHI ecosystem.
66

7-
## Add Submodule
7+
## Repository Structure
88

9-
This repository serves as a submodule in other SHI International Corp. projects, allowing for easy access to the API specifications. The specifications are used to automatically generate boilerplate code, aiding in the development and maintenance of our services.
9+
```text
10+
.
11+
├── specs/ # Raw OpenAPI specification files (JSON format)
12+
├── src/
13+
│ ├── dataGateway/ # Source code and SDK for Data Gateway
14+
│ └── shield/ # Source code and SDK for SHIELD
15+
└── .github/workflows/ # CI/CD workflows for validation and SDK generation
16+
```
17+
18+
- `specs/`: Contains raw OpenAPI specification files in JSON format. These files serve as the source of truth for our APIs and are used to automatically generate SDKs.
19+
20+
- `src/`: Contains SDK implementations automatically generated from the OpenAPI specifications using [Kiota](https://github.com/microsoft/kiota).
21+
22+
## Using the Specifications
23+
24+
### Accessing Raw Specifications
25+
26+
The raw OpenAPI specification files are located in the [`specs`](./specs) folder.
27+
All specifications are provided in JSON format.
1028

11-
All specifications are to be in JSON format, not YAML.
29+
### Using Published SDK Packages
1230

13-
To use these specifications in your project, follow these steps:
31+
We provide SDK packages generated from these specifications, available on npm:
1432

15-
1\. **Clone the Repository**: Include this repository as a submodule in your project by running:
33+
- [SHI - Data Gateway SDK](https://www.npmjs.com/package/@shi-corp/sdk-data-gateway)
34+
- [SHIELD SDK](https://www.npmjs.com/package/@shi-corp/sdk-shield)
35+
36+
You can install these packages using npm:
1637

1738
```bash
18-
git submodule add https://github.com/Software-Hardware-Integration-Lab/OpenAPI
39+
npm install @shi-corp/sdk-data-gateway
1940
```
2041

21-
2\. **Accessing API Specifications**: The API specifications are located in the root directory. Refer to the specific OpenAPI spec JSON files for detailed API documentation.
42+
or
43+
44+
```bash
45+
npm install @shi-corp/sdk-shield
46+
```
2247

23-
## Update Submodule
48+
Our packages are cryptographically attested upon publishing, ensuring higher security assurance.
2449

25-
The API specs change over time and it will become necessary to update the specs in various repositories.
50+
## Development
2651

27-
To do this, execute the following command in the project's root directory:
52+
To regenerate SDKs from the OpenAPI specifications, use the provided scripts in each SDK's directory:
2853

2954
```bash
30-
git submodule update --recursive --remote
55+
npm run-script generate:Sdk
3156
```
3257

58+
## Security Assurance
59+
60+
All SDK packages published by SHI International Corp. are cryptographically attested during the publishing process. This ensures the integrity and authenticity of the packages you consume.
61+
3362
## Contributing
3463

35-
We welcome contributions and feedback on our API specifications. If you would like to propose changes or improvements, please follow these steps:
64+
To contribute to the specifications or SDKs:
3665

3766
1. Fork the repository and create a new branch for your changes.
38-
2. Make the necessary modifications to the API specifications.
67+
2. Make the necessary modifications to the API specifications or SDK generation scripts.
3968
3. Submit a pull request detailing the changes made and the rationale behind them.
4069

4170
## See Also
4271

4372
- [SHI Lab - Documentation](https://docs.shilab.com)
44-
- [SHI Lab - GitHub](https://github.com/Software-Hardware-Integration-Lab)

0 commit comments

Comments
 (0)