@harnessio/react-notification-swagger-service-client
v0.0.2
Published
Harness React Notification Swagger service client - Notification APIs integrated with react hooks
Keywords
Readme
React Notification Swagger Service Client
OpenAPI -> OA
TypeScript -> TS
OpenAPI + TypeScript -> OATS
This React API client stores a collection of Harness Notification Swagger Service APIs and Interfaces contracts generated from the Open API Spec using OATS CLI internally.
APIs are using hooks from @tanstack/react-query
Steps To Generate API Client build as dist folder
yarn buildFor NextGen UI adoption : HarnessReactAPIClient should be initialized
Before using API Client, it must be initialized with required ClientCallbacks.
Example:
new NotificationSwaggerServiceAPIClient({
getHeaders: () => {
return { token: SessionToken.getToken(), 'Harness-Account': accountId }
}}Versioning
Once development phase is completed, this repo will have changes and versioning driven by API spec only.
License
MIT. Copyright(c) Harness Inc
Steps to add APIs in this folder
- Add the operation ID in
ALLOWED_OPERATION_IDSinpackages/notification-swagger-service/oats.config.ts - Run
yarn generatein thenotification-swagger-servicefolder - Test locally using
yarn build && yalc publish - Raise a PR and publish the
notification-swagger-servicepackage
