Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 2910caf

Browse files
author
Jesper Hess Nielsen
committed
Initial commit
0 parents  commit 2910caf

File tree

90 files changed

+29475
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+29475
-0
lines changed

.babelrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"plugins": [
3+
"transform-es2015-template-literals",
4+
"transform-es2015-literals",
5+
"transform-es2015-function-name",
6+
"transform-es2015-arrow-functions",
7+
"transform-es2015-block-scoped-functions",
8+
["transform-es2015-classes", { "loose": true }],
9+
"transform-es2015-object-super",
10+
"transform-es2015-shorthand-properties",
11+
["transform-es2015-computed-properties", { "loose": true }],
12+
"check-es2015-constants",
13+
"transform-es2015-spread",
14+
"transform-es2015-parameters",
15+
"transform-es2015-destructuring",
16+
"transform-es2015-block-scoping",
17+
"external-helpers",
18+
"transform-es2015-for-of"
19+
]
20+
}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.grunt
2+
node_modules
3+
tmp
4+
bin
5+
obj
6+
dist
7+
Properties
8+
SharedJS.csproj.user
9+
*.suo
10+
.idea
11+
.vs

CONTRIBUTING.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contributing
2+
The OpenAPI JS Connector is an Open Source Project [licensed under the Apache 2.0 License](LICENSE).
3+
We happily accept Pull Requests, so here are a few guidelines to get you started.
4+
## Getting Started
5+
6+
* Make sure you have a [GitHub account](https://github.com/signup/free)
7+
* Submit [a ticket](https://github.com/saxobank/openapi-connector-js/issues) for your issue, assuming one does not already exist.
8+
* Clearly describe the issue including steps to reproduce when it's a bug
9+
* Make sure you fill in the earliest version that you know as the issue
10+
* Fork the repository on GitHub
11+
12+
## Making Changes
13+
14+
* Optionally create a topic branch from where you want to base your work.
15+
* This is usually the master branch.
16+
* Only target release branches if you are certain your fix must be on that
17+
branch.
18+
* Make commits of logical units.
19+
* Check for unnecessary whitespace with `git diff --check` before committing.
20+
* Make sure your commit messages are in the proper format:
21+
22+
````
23+
Make the example in CONTRIBUTING imperative and concrete
24+
25+
Without this patch applied the example commit message in the CONTRIBUTING
26+
document is not a concrete example. This is a problem because the
27+
contributor is left to imagine what the commit message should look like
28+
based on a description rather than an example. This patch fixes the
29+
problem by making the example concrete and imperative.
30+
31+
The first line is a real life imperative statement.
32+
The body describes the behavior without the patch, why this is a problem,
33+
and how the patch fixes the problem when applied. And lastly, if the commit
34+
resolves a specific issue, reference that at the bottom.
35+
36+
Fixes #12
37+
````
38+
39+
* Make sure you have added the necessary tests for your changes.
40+
* Run _all_ the tests to assure nothing else was accidentally broken.
41+
42+
## Submitting Changes
43+
44+
* Push your changes to a topic branch in your fork of the repository.
45+
* Submit a pull request to the repository in the SaxoBank organization.
46+
* The core team looks at Pull Requests on a regular basis.
47+
* After feedback has been given we expect responses within two weeks. After two
48+
* weeks we may close the pull request if it isn't showing any activity.
49+
50+
Happy committing!

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2016 Saxo Bank A/S
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# OpenAPI Client Library
2+
3+
The OpenApi Client Library a JavaScript library for, among other things, consuming OpenAPI endpoints.
4+
The library implements all details regarding security, handshake, heartbeat, endpoint data contracts, subscriptions and batching.
5+
It also has hooks for custom conversion of data and mocked data as well as a bunch of utility functions.
6+
7+
## Building the library
8+
9+
1. Clone the repo
10+
`git clone https://github.com/saxobank/openapi-clientlib-js`
11+
2. Install Node Modules
12+
`npm install`
13+
3. Install Grunt
14+
`npm install -g grunt-cli`
15+
4. Run grunt tasks
16+
`grunt` display a list of possible commands
17+
`grunt jsdoc` build documentation
18+
`grunt dist` build distribution
19+
`grunt test` run unit tests
20+
21+
## Consuming the library
22+
23+
### Pre-built
24+
#### Namespace Setup
25+
If you are not using a module loader, but instead exposing everything in global, then include the package file in your page before any explicit dependencies.
26+
The library will be output to a global `saxo`. You can then use the library immediately like so:
27+
`var priceFormatting = new saxo.PriceFormatting(options);`
28+
29+
#### AMD Setup
30+
If you are using a module loader, such as requirejs, then we recommend you alias the path, since the filename contains a version number.
31+
```
32+
requireConfig: {
33+
// ...
34+
// consumer requirejs configuration
35+
path: {
36+
'openapi-client': 'path/to/openapi-client.js',
37+
// ...
38+
}
39+
}
40+
```
41+
You can then require in the file in the normal way and use as above.
42+
```
43+
var openapi = require("openapi-client");
44+
var prices = new openapi.Prices(options);
45+
```
46+
47+
### Dependencies
48+
|Dependency |Version |Details & URL |
49+
|-----------|------------------------|--------------|
50+
|SignalR |2.0.3 |Signal-R can be downloaded from https://github.com/SignalR/SignalR/releases/tag/2.0.3.|
51+
|jQuery |>1.11 |We do not depend on jQuery, but SignalR does. You can use any version of jquery that SignalR supports.|
52+
53+
### Browser Support
54+
The library requires an ES5-compatible browser and requires fetch and promises to be polyfilled.
55+
56+
# Contributing
57+
You want to contribute? Great! Have a look at our [contribution guidelines](CONTRIBUTING.md).

0 commit comments

Comments
 (0)