Skip to content

Commit

Permalink
feat(docs): setup webhook docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Sep 6, 2024
1 parent ebd1fc6 commit 8cac962
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
fern generate --group ts-sdk --version ${{ inputs.version }} --log-level debug
fern generate --api core --group ts-sdk --version ${{ inputs.version }} --log-level debug
- name: Update Code Snippets
env:
Expand Down
2 changes: 1 addition & 1 deletion fern/generators.yml → fern/apis/core/generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ api:
api: https://sandboxapi.givechariot.com
login: https://chariot-sandbox.us.auth0.com
specs:
- openapi: ../specs/v1.yaml
- openapi: ../../../specs/v1.yaml
overrides: ./openapi-overrides.yml
groups:
ts-sdk:
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions fern/apis/webhook/generators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
api:
specs:
- openapi: ../../../specs/webhooks.yml
5 changes: 4 additions & 1 deletion fern/versions/v1/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ navigation:
- page: Managing Transactions
path: ./pages/implementation-guide/transactions.mdx
- api: API Reference
api-name: core
display-errors: true
snippets:
typescript: "@chariot-giving/typescript-sdk"
Expand All @@ -62,4 +63,6 @@ navigation:
- unintegrated_grants:
title: Unintegrated Grants
- DAFs:
title: Donor Advised Funds
title: Donor Advised Funds
- api: Webhook Reference
api-name: webhook
27 changes: 27 additions & 0 deletions specs/webhooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
openapi: 3.0.0
info:
title: Chariot Webhooks API
version: "v1"
description: The Chariot Webhook Endpoints.
termsOfService: https://www.givechariot.com/legal-nonprofit
paths:
/payment/updated/:
post:
summary: Payment Initiated
x-fern-webhook: true # tells fern its a webhook
operationId: payment_initiated
x-fern-sdk-group-name: payments
x-fern-sdk-method-name: updated
requestBody:
content:
application/json:
schema:
type: object
properties:
amount:
type: number
currency:
$ref: '#/components/schemas/Currency'
required:
- amount
- currency

0 comments on commit 8cac962

Please sign in to comment.