-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add stainless generation to ci
- Loading branch information
Showing
5 changed files
with
169 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Upload OpenAPI spec to Stainless | ||
|
||
on: | ||
pull_request: # testing only | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
stainless: | ||
concurrency: upload-openapi-spec-action | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: stainless-api/upload-openapi-spec-action@main | ||
with: | ||
stainless_api_key: ${{ secrets.STAINLESS_API_KEY }} | ||
input_path: "crates/jstz_node/openapi.json" | ||
config_path: "crates/jstz_node/stainless.yml" | ||
project_name: "jstz-client" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# yaml-language-server: $schema=https://app.stainlessapi.com/config.schema.json | ||
|
||
organization: | ||
# Name of your organization or company, used to determine the name of the client | ||
# and headings. | ||
name: jstz client # Strangely, the organisation name is used as the name of the root class | ||
docs: https://jstz-dev.github.io/jstz/ | ||
contact: [email protected] | ||
|
||
# `targets` define the output targets and their customization options, such as | ||
# whether to emit the Node SDK and what it's package name should be. | ||
targets: | ||
node: | ||
readme_title: Jstz Client | ||
package_name: "@jstz-dev/client" | ||
production_repo: null | ||
publish: | ||
npm: false | ||
|
||
# `client_settings` define settings for the API client, such as extra constructor | ||
# arguments (used for authentication), retry behavior, idempotency, etc. | ||
client_settings: | ||
opts: {} | ||
|
||
# `environments` are a map of the name of the environment (e.g. "sandbox", | ||
# "production") to the corresponding url to use. | ||
environments: | ||
production: https://localhost:8933 | ||
|
||
# `pagination` defines [pagination schemes] which provides a template to match | ||
# endpoints and generate next-page and auto-pagination helpers in the SDKs. | ||
pagination: [] | ||
|
||
# `resources` define the structure and organziation for your API, such as how | ||
# methods and models are grouped together and accessed. See the [configuration | ||
# guide] for more information. | ||
# | ||
# [configuration guide]: | ||
# https://app.stainlessapi.com/docs/guides/configure#resources | ||
resources: | ||
accounts: | ||
# Subresources define resources that are nested within another for more powerful | ||
# logical groupings, e.g. `cards.payments`. | ||
subresources: | ||
balance: | ||
# Configure the methods defined in this resource. Each key in the object is the | ||
# name of the method and the value is either an endpoint (for example, `get /foo`) | ||
# or an object with more detail. | ||
# | ||
# [reference]: https://app.stainlessapi.com/docs/reference/config#method | ||
methods: | ||
retrieve: get /accounts/{address}/balance | ||
code: | ||
# Configure the models--named types--defined in the resource. Each key in the | ||
# object is the name of the model and the value is either the name of a schema in | ||
# `#/components/schemas` or an object with more detail. | ||
# | ||
# [reference]: https://app.stainlessapi.com/docs/reference/config#model | ||
models: | ||
parsedCode: ParsedCode | ||
methods: | ||
retrieve: get /accounts/{address}/code | ||
kv: | ||
models: | ||
kvValue: KvValue | ||
methods: | ||
retrieve: get /accounts/{address}/kv | ||
subresources: | ||
subkeys: | ||
methods: | ||
list: | ||
type: http | ||
endpoint: get /accounts/{address}/kv/subkeys | ||
paginated: false | ||
nonce: | ||
models: | ||
nonce: Nonce | ||
methods: | ||
retrieve: get /accounts/{address}/nonce | ||
|
||
logs: | ||
models: | ||
logRecord: LogRecord | ||
methods: | ||
stream: get /logs/{address}/stream | ||
subresources: | ||
persistent_requests: | ||
methods: | ||
list: | ||
type: http | ||
endpoint: get /logs/{address}/persistent/requests | ||
paginated: false | ||
retrieve: get /logs/{address}/persistent/requests/{request_id} | ||
|
||
operations: | ||
methods: | ||
inject: post /operations | ||
subresources: | ||
receipt: | ||
models: | ||
receipt: Receipt | ||
methods: | ||
retrieve: get /operations/{operation_hash}/receipt | ||
|
||
crypto: | ||
models: | ||
publicKey: PublicKey | ||
publicKeyHash: PublicKeyHash | ||
signature: Signature | ||
|
||
settings: | ||
license: Apache-2.0 | ||
|
||
# `readme` is used to configure the code snippets that will be rendered in the | ||
# README.md of various SDKs. In particular, you can change the `headline` | ||
# snippet's endpoint and the arguments to call it with. | ||
readme: | ||
example_requests: | ||
default: | ||
type: request | ||
endpoint: get /accounts/{address}/code | ||
params: &ref_0 | ||
address: REPLACE_ME | ||
headline: | ||
type: request | ||
endpoint: get /accounts/{address}/code | ||
params: *ref_0 | ||
pagination: | ||
type: request | ||
endpoint: get /accounts/{address}/kv/subkeys | ||
params: | ||
address: REPLACE_ME | ||
include_stainless_attribution: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters