Skip to content

geriremenyi/oanda-openapi-obsolete

Repository files navigation

OpenAPI Specification for OANDA's REST API v20

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.

Getting started

Prerequisites

Local setup

  1. Clone this repo
# HTTPS
https://github.com/geriremenyi/oanda-openapi.git
# SSH
[email protected]:geriremenyi/oanda-openapi.git
  1. Navigate to the root of the project and install all dependencies
yarn install

Bundle

To bundle the seperate .yaml files into one big openapi definition run the following command

npm run bundle

Validate

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

Generate code

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.

Demo

The definition is published using SwaggerUI hosted on this repo's github page:

https://geriremenyi.github.io/oanda-openapi/

Generated client repos

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.

C# (.NET core)

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/

Contributing

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.

License

MIT

About

OpenAPI Specification for OANDA's v20 REST API

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published