Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial auto code generation setup from openapi specification #2

Merged
merged 7 commits into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ dist

# TernJS port file
.tern-port

#openapi
openapitools.json
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package-lock = false
deepakgummi marked this conversation as resolved.
Show resolved Hide resolved
package-lock = false
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2022 Circle Internet Financial, LLC.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,42 @@
# circle-nodejs-sdk
Node.js SDK for Circle API
# Circle APIs Node.js Library


The Circle Node library provides convenient access to the Circle API for
applications written in server-side JavaScript.

## Documentation

See the [`circle-nodejs-sdk` API docs](https://developers.circle.com/reference/ping?lang=node) for Node.js.

## Requirements

Node 10 or higher.

## Installation

Install the package with: (still not published)

```sh
npm install circle-sdk --save
# or
yarn add circle-sdk
```

## Development

To run the codegen:

```sh
openapi-generator-cli generate -g typescript-axios \
-i sdk-doc.json \
-o ./src/codegen/ \
-p npmName=circle,supportsES6=true,modelPropertyNaming=original \
deepakgummi marked this conversation as resolved.
Show resolved Hide resolved
-t ./templates/typescript-axios --additional-properties=npmVersion=0.1.0-alpha.0,circleApiVersion=v1
deepakgummi marked this conversation as resolved.
Show resolved Hide resolved
```

Run all tests:

```bash
$ yarn install
$ yarn test
```
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,34 @@
"type": "git",
"url": "git+https://github.com/circlefin/circle-nodejs-sdk.git"
},
"keywords": [],
"author": "",
"keywords": [
"circle",
"circle.com"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/circlefin/circle-nodejs-sdk/issues"
},
"engines": {
"node": ">=10.0.0"
},
"dependencies": {
"axios": "0.21.4"
},
"homepage": "https://github.com/circlefin/circle-nodejs-sdk#readme",
"publishConfig": {
"registry": "https://registry.npmjs.com"
},
"devDependencies": {
"typescript": "^4.7.4"
"@types/chai": "^4.2.14",
"@types/mocha": "^8.2.0",
"@types/node": "^14.14.14",
"chai": "^4.2.0",
"expect.js": "0.3.x",
"istanbul": "^0.4.5",
"jshint": "^2.11.0",
"mocha": "8.x",
"ts-node": "^9.1.1",
"typescript": "4.1.3"
}
}
7 changes: 7 additions & 0 deletions src/generated/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.gitignore
.npmignore
README.md
git_push.sh
package.json
package-lock.json
tsconfig.json
5 changes: 5 additions & 0 deletions src/generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
api.ts
base.ts
common.ts
configuration.ts
index.ts
1 change: 1 addition & 0 deletions src/generated/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.0.1
Loading