Skip to content

Commit

Permalink
Merge pull request #2 from mitre/v3_4_0
Browse files Browse the repository at this point in the history
V3 4 0
  • Loading branch information
georgedias authored Sep 21, 2022
2 parents d571962 + 9c46654 commit 9fff2fa
Show file tree
Hide file tree
Showing 6 changed files with 1,247 additions and 213 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ The eMASS client repository (```emass_client```) maintains the Enterprise Missio

***NOTE***: A CLI tool called [emasser](https://github.com/mitre/emasser), has been developed that makes use of the ```emass_client``` RubyGem.

# Highlights
## [eMASS API Specification](https://mitre.github.io/emass_client/docs/redoc/)
The eMASS API is documented in YAML and can be viewed utilizing a multitude of visualization tools. Included is a dependency-free (and nice looking) rendering tool for viewing the API specification. The documentation is automatically generated using a Continuos Integration (CI) action [redoc-cli](https://www.npmjs.com/package/redoc-cli) command line tool.


## [Visualize and Interact with eMASS API](https://mitre.github.io/emass_client/docs/renderer/)
This repository allows anyone to visualize and interact with the API’s resources without having any of the implementation logic in place, via [hosted](https://mitre.stoplight.io/docs/emasser/c48309f365cf1-enterprise-mission-assurance-support-service-e-mass) or local mock servers. Please reference [Developers Instruction](docs/developers.md) on how to setup a local mock server

## eMASS API Clients Generation Process
# eMASS API Clients Generation Process
The executable packages (APIs) generated are used to access eMASS data and functionality by external third-party developers, business partners, or internal departments.

The following ```emass_client``` executable packages are generated by this repository:
Expand All @@ -25,13 +26,13 @@ The following ```emass_client``` executable packages are generated by this repos
- Typescript - The typescript package is hosted and available in the [NpmRegistry](https://www.npmjs.com/package/@mitre/emass_client).

### Making Changes to eMASS Clients
The most appropriat way to propose modifications or make changes to the eMASS clients generated in this repository is by [forking](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) this repository.
The most appropriate way to propose modifications or make changes to the eMASS clients generated in this repository is by [forking](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) this repository.

- Step 1

[Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) this repository

- Step 2 (otional)
- Step 2 (optional)

Create a new [branch](https://docs.github.com/en/get-started/quickstart/github-glossary#branch) to apply the modifications

Expand All @@ -45,7 +46,7 @@ The most appropriat way to propose modifications or make changes to the eMASS cl

Ensure that the client(s) configuration file ```src/openapi/templates/[ruby or typescript]-generator-config.json``` reflect the correct version to be generated

**Note**: Modifications or updates to the eMASS API specification file ```eMASSRestOpenApi.yaml``` triggers the clients' generation actions; both the ruby ```src/ruby_client```and typescript-axios ```src/typescript_client```clients are re-generated and committed to the repository when [merged](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request) with the main branch.
**Note**: Modifications or updates to the eMASS API specification file ```eMASSRestOpenApi.yaml``` triggers the clients' generation actions; both the ruby gem ```src/ruby_client``` and typescript-axios npm ```src/typescript_client``` clients are re-generated and committed to the appropriate repositories when [merged](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request) with the main branch.

- Step 5

Expand All @@ -60,7 +61,7 @@ The most appropriat way to propose modifications or make changes to the eMASS cl
Once the repository maintainer has approved a pull request, the updates in the forked or branch repository are merged with the main project repository.


***NOTE***: The generated clients version does not necessary have to be synchronized with the [GitHub Release](https://github.com/mitre/emass_client/releases)
***NOTE***: The `emass_client` [GitHub Release](https://github.com/mitre/emass_client/releases) and the generated clients ([Ruby](https://rubygems.org/gems/emass_client) and [Typescript](https://www.npmjs.com/package/@mitre/emass_client)) version indicate what eMASS API version they implement.


### Other Programming Languages
Expand Down
6 changes: 3 additions & 3 deletions docs/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ Now you can access the fake API endpoints utilizing either CURL or the Swagger E
``` node
curl -X GET "http://localhost:4010/api/systems?policy=rmf" -H "accept: application/json" -H "api-key: f32516cc-57d3-43f5-9e16-8f86780a4cce" -H "user-uid: 1647389405"
```
**Note:** The API expects an api-key and user-uid in the request headers for all endpoint calls. For interacting with the mock server, simply use any arbitrary value for these keys..
**Note:** The API expects an api-key and user-uid in the request headers for all endpoint calls. For interacting with the mock server, simply use any arbitrary value for these keys.

## Build an eMASS Client SDK
## Building an eMASS Client SDK
The API clients are generated utilizing the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) CLI.

**Note:** Currently there are two (2) client SDKs (ruby, and typscript-axios) that are automatically generated utilizing GitHub action implemented within this repository. They are generated when a push to the main branch occurs and the API specification file has been modified.

### Generate an eMASS Client
Follow these steps to generate an eMASS client for any supported language provided by the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) CLI:
Follow these steps to generate an eMASS client for additional supported language provided by the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) CLI:
- Step 1

Install the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator#1---installation)
Expand Down
Loading

0 comments on commit 9fff2fa

Please sign in to comment.