seenspire-api-client v2.0.0-alpha.26
Title
Seenspire - interface & api client library
Motivation
To have a well typed application, typings definitions and consistency, we use the backend as one source of truth, this library acts as a bridge for frontend applications to relay on that source of truth.
Summary
Generates api client from remote swagger.json file, based on modified
typescript-fetch mustache template.
How to install
quick start
brew install swagger-codegen@2
nvm use v10.21.0
yarn run build:swagger:staging #staging is where the changes usually are first.
#Update `TRIALEXPIRED` values (not props) to `TRIALEXPIRED` in api.ts
yarn run build:library
swagger-codegen from GitHub - swagger-api/swagger-codegen: swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
Remove any .lock files.
Install yarn globally https://classic.yarnpkg.com/en/docs/install
Commit your work with a message Changes
Run npm version prerelease or just up the version manually and commit with a message of the version online example 2.0.0-alpha.10
Make sure you are logged in into npm registry npm login (ask the admin for credentials)
Run npm public
To see these changes appear in the seenspire-webapp, match the version to the new version number in package.json and yarn install. Warning: Chances are theres a lot of type changes that occur when this library is updated. You will have to fix them all before the webapp loads properly.
Notes:
- Needs to be swagger version 2, other the build doesn’t work
- Needs to run against v10.21.0 (only tested against this version), higher versions don’t seem to work
Usage
- build:swagger : builds the typescript files from the remote swagger.json file
- build : builds the javascript files (with .d.ts) into ./dist
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago