This repository is a more organized version of the generated OANDA v20 REST API's OpenAPI definition. The definition is rewritten to leverage OpenAPI's newest (3.x.x) syntax. Also the definitions are separated into different files and redundancy is removed.
- Node to bundle, test etc.
- Yarn for package dependencies.
- Java (optional) to generate code.
- Visual Studio Code (optional) as the IDE.
- Clone this repo
# HTTPS
https://github.com/geriremenyi/oanda-openapi.git
# SSH
[email protected]:geriremenyi/oanda-openapi.git
- Navigate to the root of the project and install all dependencies
yarn install
To bundle the seperate .yaml
files into one big openapi definition run the following command
npm run bundle
To validate that the definition complies with the OpenApi 3 standards run the following commands:
# Validates the separate yamls
npm run validate:original
# Validates the bundled yaml
npm run validate:bundled
To generate code you will need JVM because the code generator package is just a wrapper around the official code generator written in Java.
To generate C# (.NET core) client run the following command:
npm run generate:csharp-netcore
You can add more code generators via defining it in the config folder and creating a new run command in the package.json.
The definition is published using SwaggerUI hosted on this repo's github page:
https://geriremenyi.github.io/oanda-openapi/
There is a continuous integration job setup which runs on every pull request. This makes sure that the definition is syntactically correct.
There is also a continuous deployment job setup which runs on every merge to master. This generates the client codes and pushes them to the corresponding GitHub repos.
The generated C# code is pushed to nuget.org on every push to the target client repository.
Repository: https://github.com/geriremenyi/oanda-dotnet-client
Nuget package: https://www.nuget.org/packages/GeriRemenyi.Oanda.V20.Client/
Pull requests and any kind of contribution are welcome. For major changes, please open an issue first to discuss what you would like to change.