|
| 1 | +# yaml-language-server: $schema=https://app.stainlessapi.com/config.schema.json |
| 2 | + |
| 3 | +organization: |
| 4 | + # Name of your organization or company, used to determine the name of the client |
| 5 | + # and headings. |
| 6 | + name: lightswitch |
| 7 | + docs: https://docs.lightswitch.com |
| 8 | + |
| 9 | + |
| 10 | +# `targets` define the output targets and their customization options, such as |
| 11 | +# whether to emit the Node SDK and what it's package name should be. |
| 12 | +targets: |
| 13 | + typescript: |
| 14 | + package_name: lightswitch-api |
| 15 | + production_repo: GitbookIO/lightswitch |
| 16 | + publish: |
| 17 | + npm: true |
| 18 | + |
| 19 | +# `client_settings` define settings for the API client, such as extra constructor |
| 20 | +# arguments (used for authentication), retry behavior, idempotency, etc. |
| 21 | +client_settings: |
| 22 | + opts: {} |
| 23 | + |
| 24 | +# `environments` are a map of the name of the environment (e.g. "sandbox", |
| 25 | +# "production") to the corresponding url to use. |
| 26 | +environments: |
| 27 | + production: https://lightswitch.gitbook.dev/api |
| 28 | + |
| 29 | +# `pagination` defines [pagination schemes] which provides a template to match |
| 30 | +# endpoints and generate next-page and auto-pagination helpers in the SDKs. |
| 31 | +pagination: [] |
| 32 | + |
| 33 | +# `resources` define the structure and organziation for your API, such as how |
| 34 | +# methods and models are grouped together and accessed. See the [configuration |
| 35 | +# guide] for more information. |
| 36 | +# |
| 37 | +# [configuration guide]: |
| 38 | +# https://app.stainlessapi.com/docs/guides/configure#resources |
| 39 | +resources: |
| 40 | + projects: |
| 41 | + # Configure the methods defined in this resource. Each key in the object is the |
| 42 | + # name of the method and the value is either an endpoint (for example, `get /foo`) |
| 43 | + # or an object with more detail. |
| 44 | + # |
| 45 | + # [reference]: https://app.stainlessapi.com/docs/reference/config#method |
| 46 | + # Configure the models--named types--defined in the resource. Each key in the |
| 47 | + # object is the name of the model and the value is either the name of a schema in |
| 48 | + # `#/components/schemas` or an object with more detail. |
| 49 | + # |
| 50 | + # [reference]: https://app.stainlessapi.com/docs/reference/config#model |
| 51 | + models: |
| 52 | + project: Project |
| 53 | + methods: |
| 54 | + list: get /projects |
| 55 | + create: post /projects |
| 56 | + |
| 57 | + tasks: |
| 58 | + models: |
| 59 | + task: Task |
| 60 | + methods: |
| 61 | + list: get /tasks |
| 62 | + create: post /tasks |
| 63 | + update: put /tasks/{task_id} |
| 64 | + |
| 65 | + users: |
| 66 | + models: |
| 67 | + user: User |
| 68 | + methods: |
| 69 | + list: get /users |
| 70 | + create: post /users |
| 71 | + |
| 72 | +settings: |
| 73 | + # All generated integration tests that hit the prism mock http server are marked |
| 74 | + # as skipped. Removing this setting or setting it to false enables tests, but |
| 75 | + # doing so may result in test failures due to bugs in the test server. |
| 76 | + # |
| 77 | + # [prism mock http server]: https://stoplight.io/open-source/prism |
| 78 | + disable_mock_tests: true |
| 79 | + license: Apache-2.0 |
| 80 | + |
| 81 | +# `readme` is used to configure the code snippets that will be rendered in the |
| 82 | +# README.md of various SDKs. In particular, you can change the `headline` |
| 83 | +# snippet's endpoint and the arguments to call it with. |
| 84 | +readme: |
| 85 | + example_requests: |
| 86 | + default: |
| 87 | + type: request |
| 88 | + endpoint: get /projects |
| 89 | + params: &ref_0 {} |
| 90 | + headline: |
| 91 | + type: request |
| 92 | + endpoint: get /projects |
| 93 | + params: *ref_0 |
| 94 | + pagination: |
| 95 | + type: request |
| 96 | + endpoint: get /projects |
| 97 | + params: *ref_0 |
| 98 | + |
| 99 | +openapi: |
| 100 | + code_samples: 'mintlify' |
0 commit comments