diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index ca31876ee57..6bd98ee8d6d 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,11 +1,26 @@
+# General rule for everything
* @dsinghvi
-fern/* @dsinghvi
+
+# Specific rules for fern/
+fern/docs.yml @chdeskur
+fern/pages/* @chdeskur
+
+# Specific rules for generators
generators/go/* @amckinney
-generators/java/* @dcb6
-generators/csharp/* @dcb6
-generators/python/* @armandobelardo
-generators/ruby/* @armandobelardo
-generators/typescript/* @dsinghvi
+generators/go-v2/* @amckinney
+generators/php/* @amckinney
+generators/commons/* @amckinney
+generators/csharp/* @Swimburger
+generators/typescript/* @Swimburger
+generators/java/* @dsinghvi
+generators/python/* @dsinghvi
+generators/python-v2/* @dsinghvi
+generators/ruby/* @dsinghvi
+generators/swift/* @dsinghvi
+generators/postman/* @dsinghvi
+generators/openapi/* @dsinghvi
+
+# Specific rules for packages
packages/cli/* @amckinney
-packages/generators/cli/* @armandobelardo
-packages/generators/docker/* @armandobelardo
+packages/generators/cli/* @dsinghvi
+packages/generators/docker/* @dsinghvi
diff --git a/.github/ISSUE_TEMPLATE/cli.md b/.github/ISSUE_TEMPLATE/cli.md
deleted file mode 100644
index 802ec462446..00000000000
--- a/.github/ISSUE_TEMPLATE/cli.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-name: CLI Bug report
-about: Report a bug with the Fern CLI
-title: "[Bug]"
-labels: cli
-assignees: dsinghvi
----
-
-### Describe the bug
-
-A clear and concise description of what the bug is.
-
-### To reproduce
-
-Steps to reproduce the behavior:
-
-1. Go to '...'
-2. Run the command '....'
-3. See error
-
-If relevant, provide a minimal API definition (OpenAPI or Fern Definition) or Docs configuration (`docs.yml`) that can be used to reproduce the error.
-
-### Expected behavior
-
-A clear and concise description of what you expected to happen.
-
-### Screenshots
-
-If applicable, add screenshots to help explain your problem.
-
-### CLI Version
-
-The version of the Fern CLI you are using (found in `fern.config.json`).
-
-### Additional context
-
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/csharp b/.github/ISSUE_TEMPLATE/csharp
deleted file mode 100644
index a77df6919ad..00000000000
--- a/.github/ISSUE_TEMPLATE/csharp
+++ /dev/null
@@ -1,53 +0,0 @@
----
-name: C# Generator Bug report
-about: Report a bug with the C# Generator
-title: "[Bug]"
-labels: csharp
-assignees: amckinney
----
-
-## Describe the Bug
-
-A clear and concise description of what the bug is.
-
-## Information to Reproduce
-
-### CLI Version
-
-The version of the Fern CLI you are
-using (found in `fern.config.json`).
-
-### Generator Version
-
-The version of the generator you are using (found in `generators.yml`). Plus any custom configuration required to reproduce the bug (found in `generators.yml`).
-
-### API Definition
-
-The minimal OpenAPI specification or Fern definition required to reproduce the bug.
-
-```yaml
-types:
- Pet:
- name: string
- age: double
-```
-
-### Actual SDK
-
-The buggy SDK that is produced:
-
-```csharp
-# TODO
-```
-
-### Expected SDK
-
-The expected SDK
-
-```csharp
-# TODO
-```
-
-## Additional Context
-
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/docs-bug.yml b/.github/ISSUE_TEMPLATE/docs-bug.yml
new file mode 100644
index 00000000000..fc0badf1805
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/docs-bug.yml
@@ -0,0 +1,57 @@
+name: "Docs Bug Report"
+description: "Report a bug with Fern Docs"
+labels:
+ - product/docs
+ - bug
+assignees: dsheridan
+body:
+ - type: markdown
+ attributes:
+ value: "Please provide the following details to help us reproduce and fix the issue."
+ - type: input
+ id: cli-version
+ attributes:
+ label: "CLI Version (from `fern.config.json`)"
+ placeholder: "e.g., 0.44.11"
+ validations:
+ required: true
+ - type: textarea
+ id: api-spec
+ attributes:
+ label: "Minimal API Specification"
+ description: "Provide the smallest API spec necessary to reproduce the issue. This helps us quickly understand the context of the bug."
+ placeholder: "Paste the API spec here..."
+ validations:
+ required: true
+ - type: textarea
+ id: actual-site
+ attributes:
+ label: "Actual UI Behavior"
+ description: "Describe what is currently happening in the UI. If possible, include a screenshot, Loom video, or any other visual aid to help us understand the issue."
+ placeholder: "Paste a screenshot, Loom video, or detailed description of the issue here..."
+ validations:
+ required: true
+ - type: textarea
+ id: expected-site
+ attributes:
+ label: "Expected UI Behavior"
+ description: "Describe what you expected the UI to do. Providing as much detail as possible helps us understand the difference between expected and actual behavior."
+ placeholder: "Describe the expected behavior, including any screenshots or visuals..."
+ validations:
+ required: true
+ - type: textarea
+ id: steps-to-reproduce
+ attributes:
+ label: "Steps to Reproduce"
+ description: "List the steps to reproduce the issue. This helps us replicate the problem on our end."
+ placeholder: "1. Go to ...\n2. Click on ...\n3. Observe the issue..."
+ validations:
+ required: false
+ - type: textarea
+ id: environment-details
+ attributes:
+ label: "Environment Details"
+ description: "Provide information about your environment, such as browser version, OS, and any other relevant details."
+ placeholder: "e.g., Chrome 90, macOS 12.1"
+ validations:
+ required: false
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/docs-feature.yml b/.github/ISSUE_TEMPLATE/docs-feature.yml
new file mode 100644
index 00000000000..f8398d8d302
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/docs-feature.yml
@@ -0,0 +1,38 @@
+name: "Docs Feature Request"
+description: "Request a new feature for Fern Docs"
+labels:
+ - product/docs
+ - feature
+assignees: dsheridan
+body:
+ - type: markdown
+ attributes:
+ value: "Have a feature idea for Fern Docs? Let us know why it's important and what it should look like!"
+ - type: textarea
+ id: feature-description
+ attributes:
+ label: "Feature Description"
+ description: "Explain in detail what the feature should do, how it will improve the user experience, and why it is needed. Provide specific examples if possible."
+ placeholder: "Describe the feature, its purpose, and the problem it solves..."
+ validations:
+ required: true
+ - type: textarea
+ id: use-case
+ attributes:
+ label: "Use Case"
+ description: "Provide a specific use case or scenario where this feature would be particularly useful."
+ placeholder: "Describe a situation where this feature would be helpful..."
+ validations:
+ required: true
+ - type: textarea
+ id: proposed-experience
+ attributes:
+ label: "Proposed Experience (Optional)"
+ description: "If possible, share what the UI or workflow should look like, including examples, diagrams, or screenshots."
+ placeholder: "Provide a description, diagram, screenshot, or leave blank if unsure..."
+ - type: textarea
+ id: alternatives-considered
+ attributes:
+ label: "Alternatives Considered (Optional)"
+ description: "If you've considered other solutions or workarounds, please describe them here."
+ placeholder: "Describe any alternative approaches you have thought of or tried..."
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/docs.md b/.github/ISSUE_TEMPLATE/docs.md
deleted file mode 100644
index b92104f0a41..00000000000
--- a/.github/ISSUE_TEMPLATE/docs.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-name: Fern Docs Bug report
-about: Report a bug with the Fern Docs product
-title: "[Bug]"
-labels: "fern docs"
-assignees: abvthecity
----
-
-## Describe the Bug
-
-A clear and concise description of what the bug is.
-
-## Information to Reproduce
-
-### CLI Version
-
-The version of the Fern CLI you are
-using (found in `fern.config.json`).
-
-### Actual Behavior
-
-The buggy behavior that is produced.
-
-### Expected Behavior
-
-What you wanted to happen. Please share a preview link or screenshot of the expected behavior.
-
-### API Definition (if relevant)
-
-The minimal OpenAPI specification or Fern definition required to reproduce the bug.
-
-```yaml
-types:
- Pet:
- name: string
- age: double
-```
-
-## Additional Context
-
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/documentation-suggestion.md b/.github/ISSUE_TEMPLATE/documentation-suggestion.md
deleted file mode 100644
index 36f39ab1b12..00000000000
--- a/.github/ISSUE_TEMPLATE/documentation-suggestion.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: Documentation improvement
-about: Suggest a change to Fern's documentation docs.buildwithfern.com
-title: "[Fern's Documentation] "
-labels: documentation
-assignees: ''
-
----
-
-### What can be improved
-
-A clear and concise description about what can be improved in Fern's documentation.
-
-### Relevant Screenshots
-
-Any relevant screenshots.
-
-### Link a PR (optional)
-
-Offer a suggestion for how you would write the improvement. [Here's the folder](https://github.com/fern-api/fern/tree/main/fern) where you'll find Fern's documentation written in markdown (MDX) files.
diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml
new file mode 100644
index 00000000000..91da2b109a9
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/documentation.yml
@@ -0,0 +1,37 @@
+name: "Documentation Issue"
+description: "Report an issue or suggest an improvement for the documentation"
+labels:
+ - documentation
+assignees: dsheridan
+body:
+ - type: markdown
+ attributes:
+ value: "Help us improve our documentation by reporting an issue or suggesting an enhancement."
+ - type: input
+ id: page-url
+ attributes:
+ label: "Documentation Page URL"
+ description: "Provide the URL of the documentation page where you found the issue."
+ placeholder: "e.g., https://buildwithfern.com/learn/your-page"
+ validations:
+ required: true
+ - type: textarea
+ id: issue-description
+ attributes:
+ label: "Issue Description"
+ description: "Describe the issue or improvement in detail. Include any errors, inconsistencies, or areas of confusion."
+ placeholder: "Describe the issue here..."
+ validations:
+ required: true
+ - type: textarea
+ id: steps-to-reproduce
+ attributes:
+ label: "Steps to Reproduce (Optional)"
+ description: "Provide clear steps to help us reproduce the issue. This will help us understand the problem more easily."
+ placeholder: "1. Go to the page...\n2. Click on...\n3. Observe the issue..."
+ - type: textarea
+ id: suggested-improvement
+ attributes:
+ label: "Suggested Improvement"
+ description: "Propose how the documentation could be improved. Include specific changes or additional information that could be helpful."
+ placeholder: "Suggest an improvement or leave blank if unsure..."
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md
deleted file mode 100644
index e7c28b6f302..00000000000
--- a/.github/ISSUE_TEMPLATE/feature-request.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-name: Feature request
-about: Let us know a feature you would want in Fern
-title: "[Feature]"
-labels: ''
-assignees: ''
-
----
-
-### Problem description
-
-A clear and concise description of the problem.
-
-### Why would it be useful?
-
-Why would this feature be useful for Fern users?
-
-### Describe the solution (optional)
-
-A concise description of what the feature should be.
-
-### Additional context
-
-Add any other context or screenshots.
diff --git a/.github/ISSUE_TEMPLATE/go.md b/.github/ISSUE_TEMPLATE/go.md
deleted file mode 100644
index 0ed61a4becd..00000000000
--- a/.github/ISSUE_TEMPLATE/go.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-name: Go Generator Bug report
-about: Report a bug with the Go Generator
-title: "[Bug]"
-labels: go
-assignees: amckinney
----
-
-## Describe the Bug
-
-A clear and concise description of what the bug is.
-
-## Information to Reproduce
-
-### CLI Version
-
-The version of the Fern CLI you are
-using (found in `fern.config.json`).
-
-### Generator Version
-
-The version of the generator you are using (found in `generators.yml`). Plus any custom configuration required to reproduce the bug (found in `generators.yml`).
-
-### API Definition
-
-The minimal OpenAPI specification or Fern definition required to reproduce the bug.
-
-```yaml
-types:
- Pet:
- name: string
- age: double
-```
-
-### Actual SDK
-
-The buggy SDK that is produced:
-
-```go
-# TODO
-```
-
-### Expected SDK
-
-The expected SDK
-
-```go
-# TODO
-```
-
-## Additional Context
-
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/java.md b/.github/ISSUE_TEMPLATE/java.md
deleted file mode 100644
index 37d06d55359..00000000000
--- a/.github/ISSUE_TEMPLATE/java.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-name: Java Generator Bug report
-about: Report a bug with the Java Generator
-title: "[Bug]"
-labels: java
-assignees: dsinghvi
----
-
-## Describe the Bug
-
-A clear and concise description of what the bug is.
-
-## Information to Reproduce
-
-### CLI Version
-
-The version of the Fern CLI you are
-using (found in `fern.config.json`).
-
-### Generator Version
-
-The version of the generator you are using (found in `generators.yml`). Plus any custom configuration required to reproduce the bug (found in `generators.yml`).
-
-### API Definition
-
-The minimal OpenAPI specification or Fern definition required to reproduce the bug.
-
-```yaml
-types:
- Pet:
- name: string
- age: double
-```
-
-### Actual SDK
-
-The buggy SDK that is produced:
-
-```java
-# TODO
-```
-
-### Expected SDK
-
-The expected SDK
-
-```java
-# TODO
-```
-
-## Additional Context
-
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/openapi.md b/.github/ISSUE_TEMPLATE/openapi.md
deleted file mode 100644
index 1775f044696..00000000000
--- a/.github/ISSUE_TEMPLATE/openapi.md
+++ /dev/null
@@ -1,72 +0,0 @@
----
-name: OpenAPI Generator Bug Report
-about: Report a bug with the OpenAPI Generator
-title: "[Bug]"
-labels: openapi
-assignees: dsinghvi
----
-
-## Describe the Bug
-
-A clear and concise description of what the bug is.
-
-## Information to Reproduce
-
-### CLI Version
-
-The version of the Fern CLI you are
-using (found in `fern.config.json`).
-
-### Generator Version
-
-The version of the OpenAPI generator y
-ou are using (found in `generators.yml`).
-
-### Custom Config
-
-Any custom configuration requires to r
-eproduce the bug (found in `generators.yml`).
-
-```yaml
-config:
- format: json
- customOverrides:
- license: MIT
-```
-
-### Fern Definition
-
-The minimal fern definition required to reproduce the bug.
-
-```yaml
-types:
- Movie:
- name: string
- rating: double
-```
-
-### Actual OpenAPI
-
-The buggy OpenAPI document that is produced:
-
-```yaml
-paths:
- /my/path:
- post:
- foo: bar # <----- This part is buggy
-```
-
-### Expected OpenAPI
-
-The buggy OpenAPI document that is produced:
-
-```yaml
-paths:
- /my/path:
- post:
- baz: faz # <----- This is the fix
-```
-
-## Additional Context
-
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/other.yml b/.github/ISSUE_TEMPLATE/other.yml
new file mode 100644
index 00000000000..34bcb0b7741
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/other.yml
@@ -0,0 +1,23 @@
+name: "Other Issue"
+description: "Report any other issue or share feedback not covered by other templates"
+labels:
+ - other
+assignees: dsheridan
+body:
+ - type: markdown
+ attributes:
+ value: "Have something to report that doesn't fit into any of our other categories? Share it here!"
+ - type: textarea
+ id: issue-description
+ attributes:
+ label: "Issue Description"
+ description: "Provide a detailed description of the issue or feedback you want to share."
+ placeholder: "Describe the issue or feedback here..."
+ validations:
+ required: true
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: "Additional Context (Optional)"
+ description: "Include any relevant details, links, or attachments that might help us understand the issue better."
+ placeholder: "Provide any additional context here..."
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/postman.md b/.github/ISSUE_TEMPLATE/postman.md
deleted file mode 100644
index 27174df9312..00000000000
--- a/.github/ISSUE_TEMPLATE/postman.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-name: Postman Generator Bug report
-about: Report a bug with the Postman Generator
-title: "[Bug]"
-labels: postman
-assignees: dsinghvi
----
-
-## Describe the Bug
-
-A clear and concise description of what the bug is.
-
-## Information to Reproduce
-
-### CLI Version
-
-The version of the Fern CLI you are
-using (found in `fern.config.json`).
-
-### Generator Version
-
-The version of the generator you are using (found in `generators.yml`). Plus any custom configuration required to reproduce the bug (found in `generators.yml`).
-
-### API Definition
-
-The minimal OpenAPI specification or Fern definition required to reproduce the bug.
-
-```yaml
-types:
- Pet:
- name: string
- age: double
-```
-
-### Actual Postman collection
-
-The buggy collection that is produced:
-
-```json
-# TODO
-```
-
-### Expected Postman collection
-
-The expected collection:
-
-```json
-# TODO
-```
-
-## Additional Context
-
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/python.md b/.github/ISSUE_TEMPLATE/python.md
deleted file mode 100644
index 8216e55aa78..00000000000
--- a/.github/ISSUE_TEMPLATE/python.md
+++ /dev/null
@@ -1,63 +0,0 @@
----
-name: Python Generator Bug report
-about: Report a bug with the Python Generator
-title: "[Bug]"
-labels: python
-assignees: armandobelardo
----
-
-## Describe the Bug
-
-A clear and concise description of what the bug is.
-
-## Information to Reproduce
-
-### CLI Version
-
-The version of the Fern CLI you are
-using (found in `fern.config.json`).
-
-### Generator Version
-
-The version of the generator you are using (found in `generators.yml`).
-Plus any custom configuration required to reproduce the bug (found in `generators.yml`).
-
-### API Definition
-
-The minimal OpenAPI specification or Fern definition required to reproduce the bug.
-
-```yaml
-types:
- Pet:
- name: string
- age: double
-```
-
-### Actual SDK
-
-The buggy SDK that is produced:
-
-```python
-# client.py
-
-class PetStore:
- def __init__(self):
- self._client = None # <-------- This part is buggy
-```
-
-### Expected SDK
-
-The expected SDK
-
-```python
-import httpx
-
-# client.py
-class PetStore:
- def __init__(self):
- self._client = new httpx.Client() # <----- This is the fix
-```
-
-## Additional Context
-
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/ruby.md b/.github/ISSUE_TEMPLATE/ruby.md
deleted file mode 100644
index 34f1994fc5f..00000000000
--- a/.github/ISSUE_TEMPLATE/ruby.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-name: Ruby Generator Bug report
-about: Report a bug with the Ruby Generator
-title: "[Bug]"
-labels: ruby
-assignees: armandobelardo
----
-
-## Describe the Bug
-
-A clear and concise description of what the bug is.
-
-## Information to Reproduce
-
-### CLI Version
-
-The version of the Fern CLI you are
-using (found in `fern.config.json`).
-
-### Generator Version
-
-The version of the generator you are using (found in `generators.yml`). Plus any custom configuration required to reproduce the bug (found in `generators.yml`).
-
-### API Definition
-
-The minimal OpenAPI specification or Fern definition required to reproduce the bug.
-
-```yaml
-types:
- Pet:
- name: string
- age: double
-```
-
-### Actual SDK
-
-The buggy SDK that is produced:
-
-```ruby
-# TODO
-```
-
-### Expected SDK
-
-The expected SDK
-
-```ruby
-# TODO
-```
-
-## Additional Context
-
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/sdk-bug.yml b/.github/ISSUE_TEMPLATE/sdk-bug.yml
new file mode 100644
index 00000000000..c172a77e8ad
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/sdk-bug.yml
@@ -0,0 +1,54 @@
+name: "SDK Bug Report"
+description: "Report a bug with the Fern SDK generator"
+labels:
+ - product/sdk-generator
+ - bug
+assignees: dsheridan
+body:
+ - type: markdown
+ attributes:
+ value: "Please provide the following details to help us reproduce and fix the issue."
+ - type: input
+ id: cli-version
+ attributes:
+ label: "CLI Version from `fern.config.json`"
+ placeholder: "e.g., 0.44.11"
+ validations:
+ required: true
+ - type: input
+ id: generator-version
+ attributes:
+ label: "Generator & Version from `generators.yml`"
+ placeholder: "e.g., fernapi/fern-typescript-node-sdk 0.9.5"
+ validations:
+ required: true
+ - type: textarea
+ id: api-spec
+ attributes:
+ label: "Minimal API Specification"
+ description: "Provide the smallest API spec necessary to reproduce the issue. This will help us quickly understand the context of the bug."
+ placeholder: "Paste the API spec here..."
+ validations:
+ required: true
+ - type: textarea
+ id: actual-code
+ attributes:
+ label: "Actual Generated Code"
+ description: "Include a snippet of the code that was generated. Providing code samples helps us identify the issue faster."
+ placeholder: "Paste the actual generated code here..."
+ validations:
+ required: true
+ - type: textarea
+ id: expected-code
+ attributes:
+ label: "Expected Generated Code"
+ description: "Provide an example of what you expected the generated code to look like."
+ placeholder: "Paste the expected code here..."
+ validations:
+ required: true
+ - type: textarea
+ id: environment-details
+ attributes:
+ label: "Environment Details (Optional)"
+ description: "Provide any relevant information about your environment, such as operating system, Node.js version, etc."
+ placeholder: "e.g., macOS 12.3, Node.js 16.4.2"
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/sdk-feature.yml b/.github/ISSUE_TEMPLATE/sdk-feature.yml
new file mode 100644
index 00000000000..9aea130b764
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/sdk-feature.yml
@@ -0,0 +1,24 @@
+name: "SDK Feature Request"
+description: "Request a new feature for the SDK generator"
+labels:
+ - product/sdk-generator
+ - feature
+assignees: dsheridan
+body:
+ - type: markdown
+ attributes:
+ value: "Have a feature idea? Tell us why you want it and what it might look like!"
+ - type: textarea
+ id: feature-description
+ attributes:
+ label: "Feature Description"
+ description: "Explain what the feature should do and why it would be useful."
+ placeholder: "Describe the feature and its purpose here..."
+ validations:
+ required: true
+ - type: textarea
+ id: proposed-code
+ attributes:
+ label: "Proposed Generated Code (Optional)"
+ description: "If possible, share what you think the generated code should look like."
+ placeholder: "Provide a code example or leave blank if unsure..."
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/typescript.md b/.github/ISSUE_TEMPLATE/typescript.md
deleted file mode 100644
index 94f94cbbd39..00000000000
--- a/.github/ISSUE_TEMPLATE/typescript.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-name: TypeScript Generator Bug report
-about: Report a bug with the TypeScript Generator
-title: "[Bug]"
-labels: typescript
-assignees: dsinghvi
----
-
-## Describe the Bug
-
-A clear and concise description of what the bug is.
-
-## Information to Reproduce
-
-### CLI Version
-
-The version of the Fern CLI you are
-using (found in `fern.config.json`).
-
-### Generator Version
-
-The version of the generator you are using (found in `generators.yml`). Plus any custom configuration required to reproduce the bug (found in `generators.yml`).
-
-### API Definition
-
-The minimal OpenAPI specification or Fern definition required to reproduce the bug.
-
-```yaml
-types:
- Pet:
- name: string
- age: double
-```
-
-### Actual SDK
-
-The buggy SDK that is produced:
-
-```typescript
-# TODO
-```
-
-### Expected SDK
-
-The expected SDK
-
-```typescript
-# TODO
-```
-
-## Additional Context
-
-Add any other context about the problem here.
diff --git a/README.md b/README.md
index b208439ff0d..0bc333cc932 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-
+
@@ -27,8 +27,6 @@ Fern is a toolkit that allows you to input your API Definition and output SDKs a
-
-
## 🌿 SDKs
The Fern toolkit is available via a command line interface (CLI) and requires Node 18+. To install it, run:
@@ -82,35 +80,35 @@ Postman Collections, Server boilerplate, etc.). To add a generator run `fern add
### SDK Generators
-| Generator ID | Latest Version | Entrypoint |
-| -------------------------------------- | -------------- | ------------------------------------------------------------------------------- |
-| `fernapi/fern-typescript-node-sdk` | ![Typescript Generator Version](https://img.shields.io/docker/v/fernapi/fern-typescript-node-sdk) | [cli.ts](./generators/typescript/sdk/cli/src/nodeCli.ts) |
-| `fernapi/fern-python-sdk` | ![Python Generator Version](https://img.shields.io/docker/v/fernapi/fern-python-sdk) | [cli.py](./generators/python/src/fern_python/generators/sdk/cli.py) |
-| `fernapi/fern-java-sdk` | ![Java Generator Version](https://img.shields.io/docker/v/fernapi/fern-java-sdk) | [Cli.java](./generators/java/sdk/src/main/java/com/fern/java/client/Cli.java) |
-| `fernapi/fern-ruby-sdk` | ![Ruby Generator Version](https://img.shields.io/docker/v/fernapi/fern-ruby-sdk) | [cli.ts](./generators/ruby/sdk/src/cli.ts) |
-| `fernapi/fern-go-sdk` | ![Go Generator Version](https://img.shields.io/docker/v/fernapi/fern-go-sdk) | [main.go](./generators/go/cmd/fern-go-sdk/main.go) |
-| `fernapi/fern-csharp-sdk` | ![C# Generator Version](https://img.shields.io/docker/v/fernapi/fern-csharp-sdk) | [cli.ts](./generators/csharp/sdk/src/cli.ts) |
+| Generator ID | Latest Version | Entrypoint |
+| ---------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
+| `fernapi/fern-typescript-node-sdk` | ![Typescript Generator Version](https://img.shields.io/docker/v/fernapi/fern-typescript-node-sdk) | [cli.ts](./generators/typescript/sdk/cli/src/nodeCli.ts) |
+| `fernapi/fern-python-sdk` | ![Python Generator Version](https://img.shields.io/docker/v/fernapi/fern-python-sdk) | [cli.py](./generators/python/src/fern_python/generators/sdk/cli.py) |
+| `fernapi/fern-java-sdk` | ![Java Generator Version](https://img.shields.io/docker/v/fernapi/fern-java-sdk) | [Cli.java](./generators/java/sdk/src/main/java/com/fern/java/client/Cli.java) |
+| `fernapi/fern-ruby-sdk` | ![Ruby Generator Version](https://img.shields.io/docker/v/fernapi/fern-ruby-sdk) | [cli.ts](./generators/ruby/sdk/src/cli.ts) |
+| `fernapi/fern-go-sdk` | ![Go Generator Version](https://img.shields.io/docker/v/fernapi/fern-go-sdk) | [main.go](./generators/go/cmd/fern-go-sdk/main.go) |
+| `fernapi/fern-csharp-sdk` | ![C# Generator Version](https://img.shields.io/docker/v/fernapi/fern-csharp-sdk) | [cli.ts](./generators/csharp/sdk/src/cli.ts) |
### Server-side Generators
Fern's server-side generators output boilerplate application code (models and networking logic). This is intended for spec-first or API-first developers, who write their API definition (as an OpenAPI spec or Fern definition) and want to generate backend code.
-| Generator ID | Latest Version | Entrypoint |
-| ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------- |
-| `fernapi/fern-typescript-express` | ![Typescript Express Server Generator Version](https://img.shields.io/docker/v/fernapi/fern-typescript-express) |[cli.ts](./generators/typescript/express/cli/src/cli.ts) |
-| `fernapi/fern-fastapi-server` | ![Python FastAPI Server Generator Version](https://img.shields.io/docker/v/fernapi/fern-fastapi-server) | [cli.py](./generators/python/src/fern_python/generators/sdk/cli.py) |
-| `fernapi/fern-java-spring` | ![Java Spring Server Generator Version](https://img.shields.io/docker/v/fernapi/fern-java-spring) | [Cli.java](./generators/java/spring/src/main/java/com/fern/java/spring/Cli.java) |
+| Generator ID | Latest Version | Entrypoint |
+| --------------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `fernapi/fern-typescript-express` | ![Typescript Express Server Generator Version](https://img.shields.io/docker/v/fernapi/fern-typescript-express) | [cli.ts](./generators/typescript/express/cli/src/cli.ts) |
+| `fernapi/fern-fastapi-server` | ![Python FastAPI Server Generator Version](https://img.shields.io/docker/v/fernapi/fern-fastapi-server) | [cli.py](./generators/python/src/fern_python/generators/sdk/cli.py) |
+| `fernapi/fern-java-spring` | ![Java Spring Server Generator Version](https://img.shields.io/docker/v/fernapi/fern-java-spring) | [Cli.java](./generators/java/spring/src/main/java/com/fern/java/spring/Cli.java) |
### Model Generators
Fern's model generators will output schemas or types defined in your OpenAPI spec or Fern Definition.
-| Generator ID | Latest Version | Entrypoint |
-| ----------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------- |
-| `fernapi/fern-pydantic-model` | ![Pydantic Model Generator Version](https://img.shields.io/docker/v/fernapi/fern-pydantic-model) | [cli.py](./generators/python/src/fern_python/generators/sdk/cli.py) |
-| `fernapi/java-model` | ![Java Model Generator Version](https://img.shields.io/docker/v/fernapi/java-model) | [Cli.java](./generators/java/sdk/src/main/java/com/fern/java/client/Cli.java) |
-| `fernapi/fern-ruby-model` | ![Ruby Model Generator Version](https://img.shields.io/docker/v/fernapi/fern-ruby-model) | [cli.ts](./generators/ruby/model/src/cli.ts) |
-| `fernapi/fern-go-model` | ![Go Model Generator Version](https://img.shields.io/docker/v/fernapi/fern-go-model) | [main.go](./generators/go/cmd/fern-go-model/main.go) |
+| Generator ID | Latest Version | Entrypoint |
+| ----------------------------- | ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------- |
+| `fernapi/fern-pydantic-model` | ![Pydantic Model Generator Version](https://img.shields.io/docker/v/fernapi/fern-pydantic-model) | [cli.py](./generators/python/src/fern_python/generators/sdk/cli.py) |
+| `fernapi/java-model` | ![Java Model Generator Version](https://img.shields.io/docker/v/fernapi/java-model) | [Cli.java](./generators/java/sdk/src/main/java/com/fern/java/client/Cli.java) |
+| `fernapi/fern-ruby-model` | ![Ruby Model Generator Version](https://img.shields.io/docker/v/fernapi/fern-ruby-model) | [cli.ts](./generators/ruby/model/src/cli.ts) |
+| `fernapi/fern-go-model` | ![Go Model Generator Version](https://img.shields.io/docker/v/fernapi/fern-go-model) | [main.go](./generators/go/cmd/fern-go-model/main.go) |
### Spec Generators
@@ -118,11 +116,10 @@ Fern's spec generators can output an OpenAPI spec or a Postman collection.
> **Note**: The OpenAPI spec generator is primarily intended for Fern Definition users. This prevents lock-in so that one can always export to OpenAPI.
-| Generator ID | Latest Version | Entrypoint |
-| ---------------------- | ------------------------------------------------- | ------------------------------------------ |
-| `fernapi/fern-openapi` | ![OpenAPI Generator Version](https://img.shields.io/docker/v/fernapi/fern-openapi) | [cli.ts](./generators/openapi/src/cli.ts) |
-| `fernapi/fern-postman` | ![Postman Generator Version](https://img.shields.io/docker/v/fernapi/fern-postman) | [cli.ts](./generators/postman/src/cli.ts) |
-
+| Generator ID | Latest Version | Entrypoint |
+| ---------------------- | ---------------------------------------------------------------------------------- | ----------------------------------------- |
+| `fernapi/fern-openapi` | ![OpenAPI Generator Version](https://img.shields.io/docker/v/fernapi/fern-openapi) | [cli.ts](./generators/openapi/src/cli.ts) |
+| `fernapi/fern-postman` | ![Postman Generator Version](https://img.shields.io/docker/v/fernapi/fern-postman) | [cli.ts](./generators/postman/src/cli.ts) |
## 🌿 CLI Commands
diff --git a/SECURITY.md b/SECURITY.md
index e9e67fcb52a..31292209faf 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -6,8 +6,7 @@ The following versions of Fern are currently being supported with security updat
| Version | Supported |
| ------- | ------------------ |
-| 0.15.x | :white_check_mark: |
-| 0.16.x | :white_check_mark: |
+| 0.44.x | :white_check_mark: |
## Reporting a Vulnerability
diff --git a/fern/apis/docs-yml/generators.yml b/fern/apis/docs-yml/generators.yml
index c3683edefb2..b9705951d4a 100644
--- a/fern/apis/docs-yml/generators.yml
+++ b/fern/apis/docs-yml/generators.yml
@@ -1,3 +1,5 @@
+# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
+
default-group: local
groups:
local:
diff --git a/fern/apis/fern-definition/generators.yml b/fern/apis/fern-definition/generators.yml
index 684d240849b..ea06cc6c2af 100644
--- a/fern/apis/fern-definition/generators.yml
+++ b/fern/apis/fern-definition/generators.yml
@@ -1,3 +1,5 @@
+# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
+
default-group: local
groups:
local:
diff --git a/fern/apis/fhir/generators.yml b/fern/apis/fhir/generators.yml
index 2d500140d07..f658d6b3ab5 100644
--- a/fern/apis/fhir/generators.yml
+++ b/fern/apis/fhir/generators.yml
@@ -1,4 +1,5 @@
-# default-group: sdks
+# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
+
groups:
sdks:
generators:
diff --git a/fern/apis/generators-yml/generators.yml b/fern/apis/generators-yml/generators.yml
index 0add1c88abe..5f1605a81da 100644
--- a/fern/apis/generators-yml/generators.yml
+++ b/fern/apis/generators-yml/generators.yml
@@ -1,3 +1,5 @@
+# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
+
default-group: local
groups:
local:
diff --git a/fern/apis/public-api/generators.yml b/fern/apis/public-api/generators.yml
index 181362182a2..27495b7783f 100644
--- a/fern/apis/public-api/generators.yml
+++ b/fern/apis/public-api/generators.yml
@@ -1,3 +1,5 @@
+# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
+
groups:
node-sdk:
audiences:
@@ -40,7 +42,6 @@ groups:
coordinate: com.fern.api:fern-java-sdk
username: fernapi
password: ${MAVEN_PASSWORD}
- # TODO: uncomment after this config is released
signature:
keyId: ${MAVEN_CENTRAL_SECRET_KEY_KEY_ID}
password: ${MAVEN_CENTRAL_SECRET_KEY_PASSWORD}
diff --git a/fern/docs.yml b/fern/docs.yml
index 21b733c699a..7bc036a92e0 100644
--- a/fern/docs.yml
+++ b/fern/docs.yml
@@ -39,8 +39,20 @@ tabs:
css: ./assets/styles.css
redirects:
- - source: /api-definition/fern/api-yml-reference
- destination: /api-definition/fern/api-yml/overview
+ - source: /learn/api-definition/fern/api-yml-reference
+ destination: /learn/api-definition/fern/api-yml/overview
+ - source: /learn/sdks/features/:slug
+ destination: /learn/sdks/capabilities/:slug
+ - source: /learn/sdks/package-managers/:slug
+ destination: /learn/sdks/guides/publish-to-package-managers/:slug
+ - source: /learn/sdks/introduction/configuration
+ destination: /learn/sdks/introduction/language-support
+ - source: /learn/sdks/getting-started/generate-your-first-sdk
+ destination: /learn/sdks/guides/generate-your-first-sdk
+ - source: /learn/sdks/getting-started/preview-your-sdk-locally
+ destination: /learn/sdks/guides/preview-your-sdk-locally
+ - source: /learn/sdks/getting-started/publish-a-public-facing-sdk
+ destination: /learn/sdks/guides/publish-a-public-facing-sdk
navigation:
- tab: home
@@ -66,10 +78,6 @@ navigation:
- page: Authentication
icon: fa-regular fa-lock-keyhole
path: ./pages/api-definition/openapi/auth.mdx
- # - page: OpenAPI Examples
- # icon: fa-regular fa-square-terminal
- # path: ./pages/api-definition/openapi/examples.mdx
- # slug: examples
- section: Endpoints
icon: fa-regular fa-object-intersect
slug: endpoints
@@ -204,8 +212,8 @@ navigation:
contents:
- page: Overview
path: ./pages/sdks/introduction/overview.mdx
- - page: Configuration
- path: ./pages/sdks/introduction/configuration.mdx
+ - page: Language Support
+ path: ./pages/sdks/introduction/language-support.mdx
- section: Changelogs
slug: changelog
contents:
@@ -227,97 +235,91 @@ navigation:
- changelog: ./pages/changelogs/ruby-sdk
title: Ruby
slug: ruby
- - section: Getting Started
- contents:
- - page: Generate your First SDK
- path: ./pages/sdks/getting-started/generate-your-first-sdk.mdx
- - page: Preview your SDK Locally
- path: ./pages/sdks/getting-started/preview-your-sdk-locally.mdx
- - page: Publish a Public-Facing SDK
- path: ./pages/sdks/publish-sdk/publish-your-sdk.mdx
- - section: Features
+ - section: Capabilities
contents:
- page: Strongly Typed
- path: ./pages/sdks/features/strongly-typed.mdx
+ path: ./pages/sdks/capabilities/strongly-typed.mdx
- page: Idiomatic Method Names
- path: ./pages/sdks/features/idiomatic-method-names.mdx
+ path: ./pages/sdks/capabilities/idiomatic-method-names.mdx
- page: Schema Validation
- path: ./pages/sdks/features/schema-validation.mdx
+ path: ./pages/sdks/capabilities/schema-validation.mdx
- page: Discriminated Unions
- path: ./pages/sdks/features/discriminated-unions.mdx
+ path: ./pages/sdks/capabilities/discriminated-unions.mdx
- page: Multipart Form Data
- path: ./pages/sdks/features/multipart-form-data.mdx
+ path: ./pages/sdks/capabilities/multipart-form-data.mdx
- page: Forward Compatibility
- path: ./pages/sdks/features/forward-compatibility.mdx
+ path: ./pages/sdks/capabilities/forward-compatibility.mdx
- page: Registry Publishing
- path: ./pages/sdks/features/publish-to-registries.mdx
+ path: ./pages/sdks/capabilities/publish-to-registries.mdx
icon: fa-regular fa-pro
- page: Auto-Pagination
- path: ./pages/sdks/features/auto-pagination.mdx
+ path: ./pages/sdks/capabilities/auto-pagination.mdx
icon: fa-regular fa-pro
- page: OAuth Token Refresh
- path: ./pages/sdks/features/oauth.mdx
+ path: ./pages/sdks/capabilities/oauth.mdx
icon: fa-regular fa-pro
- page: Retries with Backoff
- path: ./pages/sdks/features/retries-with-backoff.mdx
+ path: ./pages/sdks/capabilities/retries-with-backoff.mdx
icon: fa-regular fa-pro
- page: Webhook Signature Verification
- path: ./pages/sdks/features/webhook-signature-verification.mdx
+ path: ./pages/sdks/capabilities/webhook-signature-verification.mdx
icon: fa-regular fa-pro
- page: Idempotency Headers
- path: ./pages/sdks/features/idempotency-headers.mdx
+ path: ./pages/sdks/capabilities/idempotency-headers.mdx
icon: fa-regular fa-pro
- page: Server-Sent Events
- path: ./pages/sdks/features/server-sent-events.mdx
+ path: ./pages/sdks/capabilities/server-sent-events.mdx
icon: fa-regular fa-pro
- page: Integration Tests
- path: ./pages/sdks/features/integration-tests.mdx
+ path: ./pages/sdks/capabilities/integration-tests.mdx
icon: fa-regular fa-pro
- page: Code Snippets
- path: ./pages/sdks/features/code-snippets.mdx
+ path: ./pages/sdks/capabilities/code-snippets.mdx
icon: fa-regular fa-pro
- page: Augment with Custom Code
- path: ./pages/sdks/features/augment-with-custom-code.mdx
+ path: ./pages/sdks/capabilities/augment-with-custom-code.mdx
icon: fa-regular fa-pro
- page: Merging Multiple APIs
- path: ./pages/sdks/features/merging-multiple-apis.mdx
+ path: ./pages/sdks/capabilities/merging-multiple-apis.mdx
icon: fa-regular fa-pro
- page: WebSockets
- path: ./pages/sdks/features/websockets.mdx
+ path: ./pages/sdks/capabilities/websockets.mdx
icon: fa-regular fa-pro
- # icon: fa-regular fa-pro
- # - page: Object oriented SDKs
- # path: ./pages/sdks/features/dummy.mdx
- # icon: fa-regular fa-pro
- # - page: Polling
- # path: ./pages/sdks/features/dummy.mdx
- # icon: fa-regular fa-pro
- # - page: GitHub integration
- # path: ./pages/sdks/features/dummy.mdx
- # icon: fa-regular fa-pro
- - section: Package Managers
+ - section: Reference
contents:
- - page: NPM (TypeScript)
- path: ./pages/sdks/integration/npm.mdx
- - page: PyPI (Python)
- slug: pypi
- path: ./pages/sdks/integration/pypi.mdx
- - page: NuGet (C#)
- slug: nuget
- path: ./pages/sdks/integration/nuget.mdx
- - page: Pkgsite (Go)
- slug: pkgsite
- path: ./pages/sdks/integration/pkgsite.mdx
- - page: Maven Central (Java)
- slug: maven-central
- path: ./pages/sdks/integration/maven-central.mdx
- - page: RubyGems (Ruby)
- slug: rubygems
- path: ./pages/sdks/integration/rubygems.mdx
- - page: Packagist (PHP)
- slug: packagist
- path: ./pages/sdks/integration/packagist.mdx
-
+ - page: Configuration
+ path: ./pages/sdks/introduction/configuration.mdx
+ - section: Guides
+ contents:
+ - page: Generate your First SDK
+ path: ./pages/sdks/getting-started/generate-your-first-sdk.mdx
+ - page: Preview your SDK Locally
+ path: ./pages/sdks/getting-started/preview-your-sdk-locally.mdx
+ - page: Publish a Public-Facing SDK
+ path: ./pages/sdks/publish-sdk/publish-your-sdk.mdx
+ slug: publish-a-public-facing-sdk
+ - section: Publish to package managers
+ contents:
+ - page: NPM (TypeScript)
+ path: ./pages/sdks/integration/npm.mdx
+ - page: PyPI (Python)
+ slug: pypi
+ path: ./pages/sdks/integration/pypi.mdx
+ - page: NuGet (C#)
+ slug: nuget
+ path: ./pages/sdks/integration/nuget.mdx
+ - page: Pkgsite (Go)
+ slug: pkgsite
+ path: ./pages/sdks/integration/pkgsite.mdx
+ - page: Maven Central (Java)
+ slug: maven-central
+ path: ./pages/sdks/integration/maven-central.mdx
+ - page: RubyGems (Ruby)
+ slug: rubygems
+ path: ./pages/sdks/integration/rubygems.mdx
+ - page: Packagist (PHP)
+ slug: packagist
+ path: ./pages/sdks/integration/packagist.mdx
- section: Alternatives
hidden: true
contents:
@@ -390,7 +392,6 @@ navigation:
- section: Components
icon: fa-regular fa-toolbox
slug: components
- # path: ./pages/docs/components/overview.mdx
contents:
- page: Overview
icon: fa-regular fa-wrench
@@ -493,6 +494,9 @@ navigation:
icon: fa-regular fa-chart-simple
slug: analytics
contents:
+ - page: Google Analytics
+ path: ./pages/docs/integrations/analytics/google.mdx
+ slug: google
- page: PostHog
path: ./pages/docs/integrations/analytics/posthog.mdx
slug: posthog
@@ -550,9 +554,6 @@ navigation:
layout:
- page: Overview
path: ./pages/cli-api/api-summary.mdx
- # snippets:
- # python: fern-api
- # typescript: "@fern-api/node-sdk"
navbar-links:
- type: minimal
@@ -576,8 +577,6 @@ logo:
light: ./images/logo-primary.svg
dark: ./images/logo-white.svg
height: 30
-# background-image:
-# dark: ./images/background.svg
colors:
accentPrimary:
dark: "#1DA32B"
diff --git a/fern/fern.config.json b/fern/fern.config.json
index 7d8a700bd42..dafc642ff7b 100644
--- a/fern/fern.config.json
+++ b/fern/fern.config.json
@@ -1,4 +1,4 @@
{
"organization": "fern",
"version": "*"
-}
\ No newline at end of file
+}
diff --git a/fern/images/background.svg b/fern/images/background.svg
deleted file mode 100644
index 49a3b358672..00000000000
--- a/fern/images/background.svg
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/fern/images/logo-primary.png b/fern/images/logo-primary.png
deleted file mode 100644
index c7034db0795..00000000000
Binary files a/fern/images/logo-primary.png and /dev/null differ
diff --git a/fern/images/logo-white.png b/fern/images/logo-white.png
deleted file mode 100644
index 6dae45def2c..00000000000
Binary files a/fern/images/logo-white.png and /dev/null differ
diff --git a/fern/pages/changelogs/cli/2024-11-23.mdx b/fern/pages/changelogs/cli/2024-11-23.mdx
new file mode 100644
index 00000000000..9838d06e40f
--- /dev/null
+++ b/fern/pages/changelogs/cli/2024-11-23.mdx
@@ -0,0 +1,4 @@
+## 0.45.0
+**`(internal):`** Several improvements to docs, conjure importer, and the cli.
+
+
diff --git a/fern/pages/changelogs/csharp-sdk/2024-11-14.mdx b/fern/pages/changelogs/csharp-sdk/2024-11-14.mdx
index ac9c06e9804..fab887bb95e 100644
--- a/fern/pages/changelogs/csharp-sdk/2024-11-14.mdx
+++ b/fern/pages/changelogs/csharp-sdk/2024-11-14.mdx
@@ -1,3 +1,3 @@
## 1.9.8
-**`(feat):`** Add support for [idempotency headers](https://buildwithfern.com/learn/sdks/features/idempotency-headers).
+**`(feat):`** Add support for [idempotency headers](https://buildwithfern.com/learn/sdks/capabilities/idempotency-headers).
diff --git a/fern/pages/docs/building-your-docs/custom-css-js.mdx b/fern/pages/docs/building-your-docs/custom-css-js.mdx
index 08f2bdf8b8f..926f8a33fb7 100644
--- a/fern/pages/docs/building-your-docs/custom-css-js.mdx
+++ b/fern/pages/docs/building-your-docs/custom-css-js.mdx
@@ -5,8 +5,8 @@ description: Add brand-specific styling, user interactions. and components to ma
---
-Custom CSS & JS are available on the Business plan.
-Adding Custom Components is available on the Enterprise plan.
+Custom CSS & JS are available on the Basic plan.
+Adding Custom Components is available on the Pro plan.
## Custom CSS
diff --git a/fern/pages/docs/building-your-docs/custom-domain.mdx b/fern/pages/docs/building-your-docs/custom-domain.mdx
index ae9618d2e1d..bf7438d29e3 100644
--- a/fern/pages/docs/building-your-docs/custom-domain.mdx
+++ b/fern/pages/docs/building-your-docs/custom-domain.mdx
@@ -9,7 +9,7 @@ You can use:
- A subdomain on your custom domain, such as `docs.example.com`
- A subpath on your custom domain, such as `example.com/docs`
-This feature is available on the Starter plan and above. [Contact us](https://buildwithfern.com/contact) to get set up.
+This feature is available on the Basic plan and above. [Contact us](https://buildwithfern.com/contact) to get set up.
@@ -92,7 +92,7 @@ If you need to update your Fern Docs site manually, run `fern generate --docs`.
### Reach out to us
-This feature is available on the Fern Docs Starter plan and above. Reach out to [sales@buildwithfern.com](mailto:sales@buildwithfern.com) to set up your subscription and obtain the configuration for setting up your custom subpath.
+This feature is available on the Fern Docs Basic plan and above. Reach out to [sales@buildwithfern.com](mailto:sales@buildwithfern.com) to set up your subscription and obtain the configuration for setting up your custom subpath.
diff --git a/fern/pages/docs/building-your-docs/links-and-redirects.mdx b/fern/pages/docs/building-your-docs/links-and-redirects.mdx
index 5cc559ad842..efd766c2df8 100644
--- a/fern/pages/docs/building-your-docs/links-and-redirects.mdx
+++ b/fern/pages/docs/building-your-docs/links-and-redirects.mdx
@@ -27,6 +27,10 @@ redirects:
```
+
+If your docs are hosted on a subpath (like `buildwithfern.com/learn`), be sure to include the subpath in the redirect.
+
+
## Links
You can add a link to an external page within your sidebar navigation with the following configuration:
diff --git a/fern/pages/docs/building-your-docs/user-feedback.mdx b/fern/pages/docs/building-your-docs/user-feedback.mdx
index 78f7cfbd2b1..1b59c222756 100644
--- a/fern/pages/docs/building-your-docs/user-feedback.mdx
+++ b/fern/pages/docs/building-your-docs/user-feedback.mdx
@@ -12,7 +12,7 @@ By default, every Markdown page of your docs contains a feedback component at th
-This feature is available on the Starter plan and above. [Contact us](https://buildwithfern.com/contact) to get set up.
+This feature is available on the Basic plan and above. [Contact us](https://buildwithfern.com/contact) to get set up.
The feedback can be sent to you in real-time via the method of your choosing (e.g. Slack, email).
diff --git a/fern/pages/docs/components/code-blocks.mdx b/fern/pages/docs/components/code-blocks.mdx
index 32b3fe8cec0..30cf9105089 100644
--- a/fern/pages/docs/components/code-blocks.mdx
+++ b/fern/pages/docs/components/code-blocks.mdx
@@ -194,10 +194,24 @@ number of lines to display. By default, the code block will display up to 20 lin
+## Wrap overflow
+
+By default, long lines that exceed the width of the code block become scrollable:
+
+```txt title="Without Word Wrap"
+A very very very long line of text that may cause the codeblock to overflow and scroll as a result.
+```
+
+To disable scrolling and wrap overflow onto the next line, use the `wordWrap` prop:
+
+```txt title="With Word Wrap" wordWrap
+A very very very long line of text that may cause the codeblock to overflow and scroll as a result.
+```
+
## Combining props
-You can combine the `title`, `highlight`, `focus`, and `maxLines`
+You can combine the `title`, `highlight`, `focus`, `maxLines`, and `wordWrap`
props to create a code block with a title, highlighted lines,
and a maximum height.
diff --git a/fern/pages/docs/getting-started/project-structure.mdx b/fern/pages/docs/getting-started/project-structure.mdx
index 07ce709efa3..7ab210f8b4e 100644
--- a/fern/pages/docs/getting-started/project-structure.mdx
+++ b/fern/pages/docs/getting-started/project-structure.mdx
@@ -90,8 +90,8 @@ navbar-links:
url: https://buildwithfern.com/contact
logo:
- light: ./images/logo-primary.png
- dark: ./images/logo-white.png
+ light: ./images/logo-primary.svg
+ dark: ./images/logo-white.svg
colors:
accentPrimary:
diff --git a/fern/pages/docs/integrations/analytics/google.mdx b/fern/pages/docs/integrations/analytics/google.mdx
new file mode 100644
index 00000000000..4057d9eed27
--- /dev/null
+++ b/fern/pages/docs/integrations/analytics/google.mdx
@@ -0,0 +1,10 @@
+---
+title: Google Analytics
+subtitle: Add Google Analytics to your Docs with Fern.
+---
+
+Fern supports integrating with both [Google Analytics 4](https://developers.google.com/analytics) and [Google Tag Manager](https://tagmanager.google.com/).
+
+
+This feature is available on the Fern Basic plan and above. Reach out to [support@buildwithfern.com](mailto:support@buildwithfern.com) to set up your Google Analytics.
+
diff --git a/fern/pages/fern-docs/content/api-playground.mdx b/fern/pages/fern-docs/content/api-playground.mdx
index 1b2d116bb6b..f58b9628480 100644
--- a/fern/pages/fern-docs/content/api-playground.mdx
+++ b/fern/pages/fern-docs/content/api-playground.mdx
@@ -3,7 +3,7 @@ title: API Playground
subtitle: Reduce "time to 200" by allowing users to make real calls to your API from right within the API Reference.
---
-This feature is available on the Business plan and above. [Contact us](https://buildwithfern.com/contact) to get set up.
+This feature is available on the Basic plan and above. [Contact us](https://buildwithfern.com/contact) to get set up.
Fern's API Playground allows users to make authenticated requests to your API without ever leaving your documentation.
diff --git a/fern/pages/sdks/features/augment-with-custom-code.mdx b/fern/pages/sdks/capabilities/augment-with-custom-code.mdx
similarity index 100%
rename from fern/pages/sdks/features/augment-with-custom-code.mdx
rename to fern/pages/sdks/capabilities/augment-with-custom-code.mdx
diff --git a/fern/pages/sdks/features/auto-pagination.mdx b/fern/pages/sdks/capabilities/auto-pagination.mdx
similarity index 100%
rename from fern/pages/sdks/features/auto-pagination.mdx
rename to fern/pages/sdks/capabilities/auto-pagination.mdx
diff --git a/fern/pages/sdks/features/code-snippets.mdx b/fern/pages/sdks/capabilities/code-snippets.mdx
similarity index 100%
rename from fern/pages/sdks/features/code-snippets.mdx
rename to fern/pages/sdks/capabilities/code-snippets.mdx
diff --git a/fern/pages/sdks/features/discriminated-unions.mdx b/fern/pages/sdks/capabilities/discriminated-unions.mdx
similarity index 100%
rename from fern/pages/sdks/features/discriminated-unions.mdx
rename to fern/pages/sdks/capabilities/discriminated-unions.mdx
diff --git a/fern/pages/sdks/features/dummy.mdx b/fern/pages/sdks/capabilities/dummy.mdx
similarity index 100%
rename from fern/pages/sdks/features/dummy.mdx
rename to fern/pages/sdks/capabilities/dummy.mdx
diff --git a/fern/pages/sdks/features/forward-compatibility.mdx b/fern/pages/sdks/capabilities/forward-compatibility.mdx
similarity index 100%
rename from fern/pages/sdks/features/forward-compatibility.mdx
rename to fern/pages/sdks/capabilities/forward-compatibility.mdx
diff --git a/fern/pages/sdks/features/idempotency-headers.mdx b/fern/pages/sdks/capabilities/idempotency-headers.mdx
similarity index 100%
rename from fern/pages/sdks/features/idempotency-headers.mdx
rename to fern/pages/sdks/capabilities/idempotency-headers.mdx
diff --git a/fern/pages/sdks/features/idiomatic-method-names.mdx b/fern/pages/sdks/capabilities/idiomatic-method-names.mdx
similarity index 100%
rename from fern/pages/sdks/features/idiomatic-method-names.mdx
rename to fern/pages/sdks/capabilities/idiomatic-method-names.mdx
diff --git a/fern/pages/sdks/features/integration-tests.mdx b/fern/pages/sdks/capabilities/integration-tests.mdx
similarity index 100%
rename from fern/pages/sdks/features/integration-tests.mdx
rename to fern/pages/sdks/capabilities/integration-tests.mdx
diff --git a/fern/pages/sdks/features/merging-multiple-apis.mdx b/fern/pages/sdks/capabilities/merging-multiple-apis.mdx
similarity index 100%
rename from fern/pages/sdks/features/merging-multiple-apis.mdx
rename to fern/pages/sdks/capabilities/merging-multiple-apis.mdx
diff --git a/fern/pages/sdks/features/multipart-form-data.mdx b/fern/pages/sdks/capabilities/multipart-form-data.mdx
similarity index 100%
rename from fern/pages/sdks/features/multipart-form-data.mdx
rename to fern/pages/sdks/capabilities/multipart-form-data.mdx
diff --git a/fern/pages/sdks/features/oauth.mdx b/fern/pages/sdks/capabilities/oauth.mdx
similarity index 100%
rename from fern/pages/sdks/features/oauth.mdx
rename to fern/pages/sdks/capabilities/oauth.mdx
diff --git a/fern/pages/sdks/features/pro.mdx b/fern/pages/sdks/capabilities/pro.mdx
similarity index 100%
rename from fern/pages/sdks/features/pro.mdx
rename to fern/pages/sdks/capabilities/pro.mdx
diff --git a/fern/pages/sdks/features/publish-to-registries.mdx b/fern/pages/sdks/capabilities/publish-to-registries.mdx
similarity index 100%
rename from fern/pages/sdks/features/publish-to-registries.mdx
rename to fern/pages/sdks/capabilities/publish-to-registries.mdx
diff --git a/fern/pages/sdks/features/retries-with-backoff.mdx b/fern/pages/sdks/capabilities/retries-with-backoff.mdx
similarity index 100%
rename from fern/pages/sdks/features/retries-with-backoff.mdx
rename to fern/pages/sdks/capabilities/retries-with-backoff.mdx
diff --git a/fern/pages/sdks/features/schema-validation.mdx b/fern/pages/sdks/capabilities/schema-validation.mdx
similarity index 100%
rename from fern/pages/sdks/features/schema-validation.mdx
rename to fern/pages/sdks/capabilities/schema-validation.mdx
diff --git a/fern/pages/sdks/features/server-sent-events.mdx b/fern/pages/sdks/capabilities/server-sent-events.mdx
similarity index 100%
rename from fern/pages/sdks/features/server-sent-events.mdx
rename to fern/pages/sdks/capabilities/server-sent-events.mdx
diff --git a/fern/pages/sdks/features/strongly-typed.mdx b/fern/pages/sdks/capabilities/strongly-typed.mdx
similarity index 100%
rename from fern/pages/sdks/features/strongly-typed.mdx
rename to fern/pages/sdks/capabilities/strongly-typed.mdx
diff --git a/fern/pages/sdks/features/webhook-signature-verification.mdx b/fern/pages/sdks/capabilities/webhook-signature-verification.mdx
similarity index 100%
rename from fern/pages/sdks/features/webhook-signature-verification.mdx
rename to fern/pages/sdks/capabilities/webhook-signature-verification.mdx
diff --git a/fern/pages/sdks/features/websockets.mdx b/fern/pages/sdks/capabilities/websockets.mdx
similarity index 100%
rename from fern/pages/sdks/features/websockets.mdx
rename to fern/pages/sdks/capabilities/websockets.mdx
diff --git a/fern/pages/sdks/getting-started/preview-your-sdk-locally.mdx b/fern/pages/sdks/getting-started/preview-your-sdk-locally.mdx
index 622e5865daf..0e118894997 100644
--- a/fern/pages/sdks/getting-started/preview-your-sdk-locally.mdx
+++ b/fern/pages/sdks/getting-started/preview-your-sdk-locally.mdx
@@ -1,17 +1,18 @@
---
title: Preview your SDK
-subtitle: Use Fern's CLI tool to preview your SDK locally.
+subtitle: Use Fern's CLI tool to preview your SDK locally.
---
-[Once you configure your SDK](/learn/sdks/getting-started/generate-your-first-sdk), you can preview the generated SDK code using Fern's CLI.
+[Once you configure your SDK](/learn/sdks/getting-started/generate-your-first-sdk), you can preview the generated SDK code using Fern's CLI.
-Simply append the `--preview` flag to the command used to generate the SDK and you will see the generated code populated in a `.preview` folder within your `fern` folder.
+Simply append the `--preview` flag to the command used to generate the SDK and you will see the generated code populated in a `.preview` folder within your `fern` folder.
-[If you have added custom code to your SDK](/learn/sdks/features/augment-with-custom-code), `--preview` will preserve those changes.
+ [If you have added custom code to your SDK](/learn/sdks/capabilities/augment-with-custom-code), `--preview` will
+ preserve those changes.
-Here's an example of how you can preview your SDK:
+Here's an example of how you can preview your SDK:
### Generator configuration
@@ -35,13 +36,13 @@ groups:
### Invoke the Fern CLI
-```shell
+```shell
fern generate --group python-sdk --preview
```
### Preview your SDK
-The resulting folder structure will look like this:
+The resulting folder structure will look like this:
@@ -70,4 +71,4 @@ fern/
```
-
\ No newline at end of file
+
diff --git a/fern/pages/sdks/introduction/configuration.mdx b/fern/pages/sdks/introduction/configuration.mdx
index 3fd9d89f420..23c58ecf96f 100644
--- a/fern/pages/sdks/introduction/configuration.mdx
+++ b/fern/pages/sdks/introduction/configuration.mdx
@@ -1,63 +1,58 @@
---
-title: 'SDK Configuration'
-subtitle: 'Configure your SDK generators in `generators.yml` and publish to registries'
+title: "SDK Configuration"
+subtitle: "Configure your SDK generators in `generators.yml` and publish to registries"
---
- Before you can configure your generators, you must setup your API Definition. Learn more [**here**](/learn/api-definition/introduction/what-is-the-fern-folder)
-
-
-
-
- The public schema for `generators.yml` can be found [**here**](https://schema.buildwithfern.dev/generators-yml.json).
+ Before you can configure your generators, you must setup your API Definition. Learn more
+ [**here**](/learn/api-definition/introduction/what-is-the-fern-folder)
## Top Level Configuration
-
```yaml title="generators.yml" maxLines=10
default-group: local
-readme:
+readme:
apiReferenceLink: https://plantstore.dev
defaultEndpoint: GET /v3/store/inventory
-groups:
- node:
- generators:
+groups:
+ node:
+ generators:
- name: fernapi/fern-typescript-node-sdk
version: 0.x.x
- output:
+ output:
location: npm
package-name: "@plantstore/sdk"
token: ${NPM_TOKEN}
- config:
+ config:
outputSourceFiles: true
- github:
+ github:
repository: "plantstore/plantstore-js"
- metadata:
+ metadata:
package-description: JavaScript library for the Plant Store API Service
license: MIT
- python:
- generators:
+ python:
+ generators:
- name: fernapi/fern-python-sdk
version: 0.x.x
- output:
+ output:
location: pypi
package-name: "plantstore"
token: ${PYPI_TOKEN}
- config:
+ config:
outputSourceFiles: true
- github:
- repository: "plantstore/plantstore-python"
+ github:
+ repository: "plantstore/plantstore-python"
```
- The default group of generators to run when running `fern generate`.
+ The default group of generators to run when running `fern generate`.
- Learn more about the README configuration [here](/learn/sdks/introduction/configuration#readme-configuration).
+ Learn more about the README configuration [here](#readme-configuration).
@@ -67,24 +62,24 @@ groups:
## README Configuration
```yaml generators.yml
-readme:
+readme:
apiReferenceLink: https://plantstore.dev
defaultEndpoint: GET /v3/store/inventory
```
- A link to your hosted API Reference. Fern will embed this link into your generated READMEs so that SDK users know to navigate to your
- API Reference.
+ A link to your hosted API Reference. Fern will embed this link into your generated READMEs so that SDK users know to
+ navigate to your API Reference.
- The endpoint you want to use in README code samples. If unspecified, Fern will default to the first POST request.
+ The endpoint you want to use in README code samples. If unspecified, Fern will default to the first POST request.
## Specify Package Metadata
```yaml generators.yml
-metadata:
+metadata:
package-description: Python library for the Plant Store API Service
license: Apache
```
@@ -94,5 +89,15 @@ metadata:
- The license you'd like to apply to the code published to GitHub. Options include `MIT` or `Apache` (Apache 2.0). To request a new license, [open a GitHub Issue](https://github.com/fern-api/fern/issues/new?assignees=&labels=&projects=&template=feature-request.md&title=%5BFeature%5D).
+ The license you'd like to apply to the code published to GitHub. Options include `MIT` or `Apache` (Apache 2.0). To
+ request a new license, [open a GitHub
+ Issue](https://github.com/fern-api/fern/issues/new?assignees=&labels=&projects=&template=feature-request.md&title=%5BFeature%5D).
+
+## Schema Validation
+
+Add the following as a comment in your `generators.yml` to enable schema validation, ensuring that your configuration is correct. Check out an example in [Cartesia's Fern Folder](https://github.com/cartesia-ai/docs/blob/43b143f66845d90bffbd0ef1951fd812229d95c0/fern/generators.yml#L1).
+
+```yaml
+yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
+```
\ No newline at end of file
diff --git a/fern/pages/sdks/introduction/language-support.mdx b/fern/pages/sdks/introduction/language-support.mdx
new file mode 100644
index 00000000000..38b07b468fb
--- /dev/null
+++ b/fern/pages/sdks/introduction/language-support.mdx
@@ -0,0 +1,30 @@
+---
+title: Language support
+---
+
+Fern supports generating SDKs in several different programming languages. Each SDK generator is written by a language expert and is officially maintained by the Fern team.
+
+### Generally Available
+
+
+
+
+
+
+
+
+
+
+
+### Coming Soon
+
+
+
+
+
+
+
+
+
+ Please reach out to support@buildwithfern.com if you're interested in our generators that are coming soon.
+
diff --git a/fern/pages/sdks/introduction/overview.mdx b/fern/pages/sdks/introduction/overview.mdx
index 86f3c13c3b7..3ce5af8219c 100644
--- a/fern/pages/sdks/introduction/overview.mdx
+++ b/fern/pages/sdks/introduction/overview.mdx
@@ -1,33 +1,23 @@
---
title: SDK Overview
-description: Generate SDKs in multiple programming languages
+description: Generate idiomatic SDKs in multiple programming languages
---
-Fern supports generating SDKs in several different programming languages. Each
-SDK generator is written by a language expert and is officially maintained by
-the Fern team.
+Let Fern do the heavy lifting of generating and publishing client libraries so your team can focus on building the API.
-### Generally Available
+## Learn more
-
-
-
-
-
-
-
-
+
+
+ Explore the full list of Fern's supported languages.
+
+
+ See Fern in action with a personalized demo.
+
+
+ Learn more about advanced features supported by Fern's SDk generation.
+
+
+ Follow our step-by-step guide to generate your first SDK in minutes.
+
-
-### Coming Soon
-
-
-
-
-
-
-
-
-
- Please reach out to support@buildwithfern.com if you're interested in our generators that are coming soon.
-
diff --git a/generators/commons/src/dynamic-snippets/AbstractDynamicSnippetsGenerator.ts b/generators/commons/src/dynamic-snippets/AbstractDynamicSnippetsGenerator.ts
new file mode 100644
index 00000000000..fefa931b597
--- /dev/null
+++ b/generators/commons/src/dynamic-snippets/AbstractDynamicSnippetsGenerator.ts
@@ -0,0 +1,16 @@
+import { AbstractDynamicSnippetsGeneratorContext } from "./AbstractDynamicSnippetsGeneratorContext";
+
+export abstract class AbstractDynamicSnippetsGenerator<
+ DynamicIntermediateRepresentation,
+ Context extends AbstractDynamicSnippetsGeneratorContext,
+ EndpointSnippetRequest,
+ EndpointSnippetResponse
+> {
+ public constructor(public readonly context: Context) {}
+
+ /**
+ * Generates code for the specified request.
+ * @param request
+ */
+ public abstract generate(request: EndpointSnippetRequest): Promise;
+}
diff --git a/generators/commons/src/dynamic-snippets/AbstractDynamicSnippetsGeneratorContext.ts b/generators/commons/src/dynamic-snippets/AbstractDynamicSnippetsGeneratorContext.ts
new file mode 100644
index 00000000000..c7d0c30e676
--- /dev/null
+++ b/generators/commons/src/dynamic-snippets/AbstractDynamicSnippetsGeneratorContext.ts
@@ -0,0 +1,8 @@
+import { FernGeneratorExec } from "@fern-fern/generator-exec-sdk";
+
+export abstract class AbstractDynamicSnippetsGeneratorContext {
+ public constructor(
+ public readonly ir: DynamicIntermediateRepresentation,
+ public readonly config: FernGeneratorExec.GeneratorConfig
+ ) {}
+}
diff --git a/generators/commons/src/dynamic-snippets/index.ts b/generators/commons/src/dynamic-snippets/index.ts
new file mode 100644
index 00000000000..64b381e483a
--- /dev/null
+++ b/generators/commons/src/dynamic-snippets/index.ts
@@ -0,0 +1,2 @@
+export { AbstractDynamicSnippetsGenerator } from "./AbstractDynamicSnippetsGenerator";
+export { AbstractDynamicSnippetsGeneratorContext } from "./AbstractDynamicSnippetsGeneratorContext";
diff --git a/generators/commons/src/index.ts b/generators/commons/src/index.ts
index 03611850e8e..71448ee2aa5 100644
--- a/generators/commons/src/index.ts
+++ b/generators/commons/src/index.ts
@@ -8,3 +8,4 @@ export * from "./project";
export * from "./readme";
export * from "./reference";
export * from "./utils";
+export * from "./dynamic-snippets";
diff --git a/generators/csharp/sdk/versions.yml b/generators/csharp/sdk/versions.yml
index eed3cdb41bd..b3185103fb2 100644
--- a/generators/csharp/sdk/versions.yml
+++ b/generators/csharp/sdk/versions.yml
@@ -27,7 +27,7 @@
createdAt: "2024-11-14"
changelogEntry:
- type: feat
- summary: Add support for [idempotency headers](https://buildwithfern.com/learn/sdks/features/idempotency-headers).
+ summary: Add support for [idempotency headers](https://buildwithfern.com/learn/sdks/capabilities/idempotency-headers).
irVersion: 53
- version: 1.9.7
createdAt: "2024-11-12"
diff --git a/generators/go-v2/dynamic-snippets/build.cjs b/generators/go-v2/dynamic-snippets/build.cjs
index cc12e9cb640..259a7b0d2a9 100644
--- a/generators/go-v2/dynamic-snippets/build.cjs
+++ b/generators/go-v2/dynamic-snippets/build.cjs
@@ -16,8 +16,6 @@ async function main() {
external: [
// Test dependencies should not be included in the published package.
'@fern-api/go-formatter',
- '@fern-api/project-loader',
- '@fern-api/workspace-loader'
],
tsconfig: "./build.tsconfig.json"
});
diff --git a/generators/go-v2/dynamic-snippets/package.json b/generators/go-v2/dynamic-snippets/package.json
index 6404dd2b6ad..a17c105e426 100644
--- a/generators/go-v2/dynamic-snippets/package.json
+++ b/generators/go-v2/dynamic-snippets/package.json
@@ -29,17 +29,11 @@
},
"devDependencies": {
"@fern-api/core-utils": "workspace:*",
- "@fern-api/dynamic-snippets": "workspace:*",
"@fern-api/fern-definition-schema": "workspace:*",
"@fern-api/fs-utils": "workspace:*",
"@fern-api/generator-commons": "workspace:*",
"@fern-api/go-ast": "workspace:*",
"@fern-api/go-formatter": "workspace:*",
- "@fern-api/ir-generator": "workspace:*",
- "@fern-api/ir-sdk": "workspace:*",
- "@fern-api/project-loader": "workspace:*",
- "@fern-api/task-context": "workspace:*",
- "@fern-api/workspace-loader": "workspace:*",
"@fern-fern/ir-sdk": "^53.21.0",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
diff --git a/generators/go-v2/dynamic-snippets/src/DynamicSnippetsGenerator.ts b/generators/go-v2/dynamic-snippets/src/DynamicSnippetsGenerator.ts
index c9b6ac99df7..ea296f9c4aa 100644
--- a/generators/go-v2/dynamic-snippets/src/DynamicSnippetsGenerator.ts
+++ b/generators/go-v2/dynamic-snippets/src/DynamicSnippetsGenerator.ts
@@ -1,11 +1,9 @@
-import { AbstractFormatter, FernGeneratorExec } from "@fern-api/generator-commons";
+import { AbstractDynamicSnippetsGenerator, AbstractFormatter, FernGeneratorExec } from "@fern-api/generator-commons";
import { go } from "@fern-api/go-ast";
import { DynamicSnippetsGeneratorContext } from "./context/DynamicSnippetsGeneratorContext";
import { dynamic as DynamicSnippets } from "@fern-fern/ir-sdk/api";
-import { AbstractDynamicSnippetsGenerator } from "@fern-api/dynamic-snippets";
import { ErrorReporter, Severity } from "./context/ErrorReporter";
import { Scope } from "./Scope";
-import { assertNever } from "@fern-api/core-utils";
import { FilePropertyInfo } from "./context/FilePropertyMapper";
const SNIPPET_PACKAGE_NAME = "example";
@@ -13,7 +11,12 @@ const SNIPPET_IMPORT_PATH = "fern";
const SNIPPET_FUNC_NAME = "do";
const CLIENT_VAR_NAME = "client";
-export class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator {
+export class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<
+ DynamicSnippets.DynamicIntermediateRepresentation,
+ DynamicSnippetsGeneratorContext,
+ DynamicSnippets.EndpointSnippetRequest,
+ DynamicSnippets.EndpointSnippetResponse
+> {
private formatter: AbstractFormatter | undefined;
constructor({
diff --git a/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/ir.test.ts.snap b/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/ir.test.ts.snap
deleted file mode 100644
index fc03ccb2d4c..00000000000
--- a/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/ir.test.ts.snap
+++ /dev/null
@@ -1,6797 +0,0 @@
-// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-
-exports[`test definitions > alias 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Get(
- context.TODO(),
- "typeId",
- )
-}
-"
-`;
-
-exports[`test definitions > alias-extends 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.ExtendedInlineRequestBody(
- context.TODO(),
- &acme.InlinedChildRequest{
- Child: "child",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > any-auth 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Auth.GetToken(
- context.TODO(),
- &acme.GetTokenRequest{
- ClientID: "client_id",
- ClientSecret: "client_secret",
- Scope: acme.String(
- "scope",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.User.Get(
- context.TODO(),
- )
-}
-"
-`;
-
-exports[`test definitions > api-wide-base-path 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.Post(
- context.TODO(),
- "pathParam",
- "serviceParam",
- "resourceParam",
- 1,
- )
-}
-"
-`;
-
-exports[`test definitions > audiences 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.FolderA.Service.GetDirectThread(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.FolderD.Service.GetDirectThread(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Foo.Find(
- context.TODO(),
- &acme.FindRequest{
- OptionalString: acme.String(
- "optionalString",
- ),
- PublicProperty: acme.String(
- "publicProperty",
- ),
- PrivateProperty: acme.Int(
- 1,
- ),
- },
- )
-}
-"
-`;
-
-exports[`test definitions > auth-environment-variables 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithAPIKey(
- "",
- ),
- )
- client.Service.GetWithAPIKey(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithAPIKey(
- "",
- ),
- )
- client.Service.GetWithHeader(
- context.TODO(),
- &acme.HeaderAuthRequest{
- XEndpointHeader: "X-Endpoint-Header",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > basic-auth 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithBasicAuth(
- "",
- "",
- ),
- )
- client.BasicAuth.GetWithBasicAuth(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithBasicAuth(
- "",
- "",
- ),
- )
- client.BasicAuth.PostWithBasicAuth(
- context.TODO(),
- map[string]interface{}{
- "key": "value",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > basic-auth-environment-variables 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithBasicAuth(
- "",
- "",
- ),
- )
- client.BasicAuth.GetWithBasicAuth(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithBasicAuth(
- "",
- "",
- ),
- )
- client.BasicAuth.PostWithBasicAuth(
- context.TODO(),
- map[string]interface{}{
- "key": "value",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > bearer-token-environment-variable 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithAPIKey(
- "",
- ),
- )
- client.Service.GetWithBearerToken(
- context.TODO(),
- )
-}
-"
-`;
-
-exports[`test definitions > bytes 1`] = `""`;
-
-exports[`test definitions > circular-references 1`] = `""`;
-
-exports[`test definitions > circular-references-advanced 1`] = `""`;
-
-exports[`test definitions > cross-package-type-names 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.FolderA.Service.GetDirectThread(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.FolderA.Service.GetDirectThread(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Foo.Find(
- context.TODO(),
- &acme.FindRequest{
- OptionalString: acme.String(
- "optionalString",
- ),
- PublicProperty: acme.String(
- "publicProperty",
- ),
- PrivateProperty: acme.Int(
- 1,
- ),
- },
- )
-}
-"
-`;
-
-exports[`test definitions > csharp-grpc-proto 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Userservice.Create(
- context.TODO(),
- &acme.CreateRequest{},
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Userservice.Create(
- context.TODO(),
- &acme.CreateRequest{
- Username: acme.String(
- "username",
- ),
- Email: acme.String(
- "email",
- ),
- Age: acme.Int(
- 1,
- ),
- Weight: acme.Float64(
- 1.1,
- ),
- Metadata: &acme.Metadata{
- StringMetadataValueMap: map[string]*acme.MetadataValue{
- "metadata": &acme.MetadataValue{
- Double: 1.1,
- },
- },
- },
- },
- )
-}
-"
-`;
-
-exports[`test definitions > csharp-grpc-proto-exhaustive 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Foo(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Foo(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Upload(
- context.TODO(),
- &acme.UploadRequest{
- Columns: []*acme.Column{
- &acme.Column{
- ID: "id",
- Values: []float64{
- 1.1,
- },
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Upload(
- context.TODO(),
- &acme.UploadRequest{
- Columns: []*acme.Column{
- &acme.Column{
- ID: "id",
- Values: []float64{
- 1.1,
- 1.1,
- },
- Metadata: &acme.Metadata{
- StringMetadataValueMap: map[string]*acme.MetadataValue{
- "metadata": &acme.MetadataValue{
- Double: 1.1,
- },
- },
- },
- IndexedData: &acme.IndexedData{
- Indices: []int{
- 1,
- 1,
- },
- Values: []float64{
- 1.1,
- 1.1,
- },
- },
- },
- &acme.Column{
- ID: "id",
- Values: []float64{
- 1.1,
- 1.1,
- },
- Metadata: &acme.Metadata{
- StringMetadataValueMap: map[string]*acme.MetadataValue{
- "metadata": &acme.MetadataValue{
- Double: 1.1,
- },
- },
- },
- IndexedData: &acme.IndexedData{
- Indices: []int{
- 1,
- 1,
- },
- Values: []float64{
- 1.1,
- 1.1,
- },
- },
- },
- },
- Namespace: acme.String(
- "namespace",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Delete(
- context.TODO(),
- &acme.DeleteRequest{},
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Delete(
- context.TODO(),
- &acme.DeleteRequest{
- IDs: []string{
- "ids",
- "ids",
- },
- DeleteAll: acme.Bool(
- true,
- ),
- Namespace: acme.String(
- "namespace",
- ),
- Filter: &acme.Metadata{
- StringMetadataValueMap: map[string]*acme.MetadataValue{
- "filter": &acme.MetadataValue{
- Double: 1.1,
- },
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Describe(
- context.TODO(),
- &acme.DescribeRequest{},
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Describe(
- context.TODO(),
- &acme.DescribeRequest{
- Filter: &acme.Metadata{
- StringMetadataValueMap: map[string]*acme.MetadataValue{
- "filter": &acme.MetadataValue{
- Double: 1.1,
- },
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Fetch(
- context.TODO(),
- &acme.FetchRequest{},
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Fetch(
- context.TODO(),
- &acme.FetchRequest{
- IDs: []*string{
- acme.String(
- "ids",
- ),
- },
- Namespace: acme.String(
- "namespace",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.List(
- context.TODO(),
- &acme.ListRequest{},
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.List(
- context.TODO(),
- &acme.ListRequest{
- Prefix: acme.String(
- "prefix",
- ),
- Limit: acme.Int(
- 1,
- ),
- PaginationToken: acme.String(
- "paginationToken",
- ),
- Namespace: acme.String(
- "namespace",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Query(
- context.TODO(),
- &acme.QueryRequest{
- TopK: 1,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Query(
- context.TODO(),
- &acme.QueryRequest{
- Namespace: acme.String(
- "namespace",
- ),
- TopK: 1,
- Filter: &acme.Metadata{
- StringMetadataValueMap: map[string]*acme.MetadataValue{
- "filter": &acme.MetadataValue{
- Double: 1.1,
- },
- },
- },
- IncludeValues: acme.Bool(
- true,
- ),
- IncludeMetadata: acme.Bool(
- true,
- ),
- Queries: []*acme.QueryColumn{
- &acme.QueryColumn{
- Values: []float64{
- 1.1,
- 1.1,
- },
- TopK: acme.Int(
- 1,
- ),
- Namespace: acme.String(
- "namespace",
- ),
- Filter: &acme.Metadata{
- StringMetadataValueMap: map[string]*acme.MetadataValue{
- "filter": &acme.MetadataValue{
- Double: 1.1,
- },
- },
- },
- IndexedData: &acme.IndexedData{
- Indices: []int{
- 1,
- 1,
- },
- Values: []float64{
- 1.1,
- 1.1,
- },
- },
- },
- &acme.QueryColumn{
- Values: []float64{
- 1.1,
- 1.1,
- },
- TopK: acme.Int(
- 1,
- ),
- Namespace: acme.String(
- "namespace",
- ),
- Filter: &acme.Metadata{
- StringMetadataValueMap: map[string]*acme.MetadataValue{
- "filter": &acme.MetadataValue{
- Double: 1.1,
- },
- },
- },
- IndexedData: &acme.IndexedData{
- Indices: []int{
- 1,
- 1,
- },
- Values: []float64{
- 1.1,
- 1.1,
- },
- },
- },
- },
- Column: []float64{
- 1.1,
- 1.1,
- },
- ID: acme.String(
- "id",
- ),
- IndexedData: &acme.IndexedData{
- Indices: []int{
- 1,
- 1,
- },
- Values: []float64{
- 1.1,
- 1.1,
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Update(
- context.TODO(),
- &acme.UpdateRequest{
- ID: "id",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dataservice.Update(
- context.TODO(),
- &acme.UpdateRequest{
- ID: "id",
- Values: []float64{
- 1.1,
- 1.1,
- },
- SetMetadata: &acme.Metadata{
- StringMetadataValueMap: map[string]*acme.MetadataValue{
- "setMetadata": &acme.MetadataValue{
- Double: 1.1,
- },
- },
- },
- Namespace: acme.String(
- "namespace",
- ),
- IndexedData: &acme.IndexedData{
- Indices: []int{
- 1,
- 1,
- },
- Values: []float64{
- 1.1,
- 1.1,
- },
- },
- },
- )
-}
-"
-`;
-
-exports[`test definitions > csharp-namespace-conflict 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Tasktest.Hello(
- context.TODO(),
- )
-}
-"
-`;
-
-exports[`test definitions > custom-auth 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithCustomAuthScheme(
- "",
- ),
- )
- client.CustomAuth.GetWithCustomAuth(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithCustomAuthScheme(
- "",
- ),
- )
- client.CustomAuth.PostWithCustomAuth(
- context.TODO(),
- map[string]interface{}{
- "key": "value",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > enum 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.InlinedRequest.Send(
- context.TODO(),
- &acme.SendEnumInlinedRequest{
- Operand: acme.OperandGreaterThan,
- OperandOrColor: &acme.ColorOrOperand{
- Color: acme.ColorRed,
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.InlinedRequest.Send(
- context.TODO(),
- &acme.SendEnumInlinedRequest{
- Operand: acme.OperandGreaterThan,
- MaybeOperand: acme.OperandGreaterThan.Ptr(),
- OperandOrColor: &acme.ColorOrOperand{
- Color: acme.ColorRed,
- },
- MaybeOperandOrColor: &acme.ColorOrOperand{
- Color: acme.ColorRed,
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.PathParam.Send(
- context.TODO(),
- acme.OperandGreaterThan,
- &acme.ColorOrOperand{
- Color: acme.ColorRed,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.PathParam.Send(
- context.TODO(),
- acme.OperandGreaterThan,
- &acme.ColorOrOperand{
- Color: acme.ColorRed,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.QueryParam.Send(
- context.TODO(),
- &acme.SendEnumAsQueryParamRequest{
- Operand: acme.OperandGreaterThan,
- OperandOrColor: &acme.ColorOrOperand{
- Color: acme.ColorRed,
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.QueryParam.Send(
- context.TODO(),
- &acme.SendEnumAsQueryParamRequest{
- Operand: acme.OperandGreaterThan,
- MaybeOperand: acme.OperandGreaterThan.Ptr(),
- OperandOrColor: &acme.ColorOrOperand{
- Color: acme.ColorRed,
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.QueryParam.SendList(
- context.TODO(),
- &acme.SendEnumListAsQueryParamRequest{
- Operand: []acme.Operand{
- acme.OperandGreaterThan,
- },
- MaybeOperand: []*acme.Operand{
- acme.OperandGreaterThan.Ptr(),
- },
- OperandOrColor: []*acme.ColorOrOperand{
- &acme.ColorOrOperand{
- Color: acme.ColorRed,
- },
- },
- MaybeOperandOrColor: []*acme.ColorOrOperand{},
- },
- )
-}
-"
-`;
-
-exports[`test definitions > error-property 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.PropertyBasedError.ThrowError(
- context.TODO(),
- )
-}
-"
-`;
-
-exports[`test definitions > examples 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Echo(
- context.TODO(),
- "Hello world!\\n\\nwith\\n\\tnewlines",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Echo(
- context.TODO(),
- "string",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Echo(
- context.TODO(),
- "primitive",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.File.Notification.Service.GetException(
- context.TODO(),
- "notification-hsy129x",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.File.Notification.Service.GetException(
- context.TODO(),
- "notificationId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- file "github.com/acme/acme-go/file"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.File.Service.GetFile(
- context.TODO(),
- "file.txt",
- &file.GetFileRequest{
- XFileAPIVersion: "0.0.2",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- file "github.com/acme/acme-go/file"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.File.Service.GetFile(
- context.TODO(),
- "filename",
- &file.GetFileRequest{
- XFileAPIVersion: "X-File-API-Version",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Health.Service.Check(
- context.TODO(),
- "id-2sdx82h",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Health.Service.Check(
- context.TODO(),
- "id-3tey93i",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Health.Service.Check(
- context.TODO(),
- "id",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Health.Service.Ping(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Health.Service.Ping(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Service.GetMovie(
- context.TODO(),
- "movie-c06a4ad7",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Service.GetMovie(
- context.TODO(),
- "movieId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Service.CreateMovie(
- context.TODO(),
- &acme.Movie{
- ID: "movie-c06a4ad7",
- Prequel: acme.String(
- "movie-cv9b914f",
- ),
- Title: "The Boy and the Heron",
- From: "Hayao Miyazaki",
- Rating: 8,
- Tag: "tag-wf9as23d",
- Metadata: map[string]interface{}{
- "actors": []interface{}{
- "Christian Bale",
- "Florence Pugh",
- "Willem Dafoe",
- },
- "releaseDate": "2023-12-08",
- "ratings": map[string]interface{}{
- "rottenTomatoes": 97,
- "imdb": 7.6,
- },
- },
- Revenue: 1000000,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Service.CreateMovie(
- context.TODO(),
- &acme.Movie{
- ID: "id",
- Prequel: acme.String(
- "prequel",
- ),
- Title: "title",
- From: "from",
- Rating: 1.1,
- Tag: "tag",
- Book: acme.String(
- "book",
- ),
- Metadata: map[string]interface{}{
- "metadata": map[string]interface{}{
- "key": "value",
- },
- },
- Revenue: 1000000,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Service.GetMetadata(
- context.TODO(),
- &acme.GetMetadataRequest{
- Shallow: acme.Bool(
- false,
- ),
- Tag: []*string{
- acme.String(
- "development",
- ),
- },
- XAPIVersion: "0.0.1",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Service.GetMetadata(
- context.TODO(),
- &acme.GetMetadataRequest{
- Shallow: acme.Bool(
- true,
- ),
- Tag: []*string{
- acme.String(
- "tag",
- ),
- },
- XAPIVersion: "X-API-Version",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- commons "github.com/acme/acme-go/commons"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Service.CreateBigEntity(
- context.TODO(),
- &acme.BigEntity{
- CastMember: &acme.CastMember{
- Actor: &acme.Actor{
- Name: "name",
- ID: "id",
- },
- },
- ExtendedMovie: &acme.ExtendedMovie{
- Cast: []string{
- "cast",
- "cast",
- },
- },
- Entity: &acme.Entity{
- Type: &acme.Type{
- BasicType: acme.BasicTypePrimitive,
- },
- Name: "name",
- },
- Metadata: &acme.Metadata{},
- CommonMetadata: &commons.Metadata{
- ID: "id",
- Data: map[string]string{
- "data": "data",
- },
- JSONString: acme.String(
- "jsonString",
- ),
- },
- EventInfo: &commons.EventInfo{
- Metadata: &commons.Metadata{
- ID: "id",
- Data: map[string]string{
- "data": "data",
- },
- JSONString: acme.String(
- "jsonString",
- ),
- },
- },
- Data: &commons.Data{},
- Migration: &acme.Migration{
- Name: "name",
- Status: acme.MigrationStatusRunning,
- },
- Exception: &acme.Exception{
- Generic: &acme.ExceptionInfo{
- ExceptionType: "exceptionType",
- ExceptionMessage: "exceptionMessage",
- ExceptionStacktrace: "exceptionStacktrace",
- },
- },
- Test: &acme.Test{},
- Node: &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{},
- Trees: []*acme.Tree{},
- },
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{},
- Trees: []*acme.Tree{},
- },
- },
- Trees: []*acme.Tree{
- &acme.Tree{
- Nodes: []*acme.Node{},
- },
- &acme.Tree{
- Nodes: []*acme.Node{},
- },
- },
- },
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{},
- Trees: []*acme.Tree{},
- },
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{},
- Trees: []*acme.Tree{},
- },
- },
- Trees: []*acme.Tree{
- &acme.Tree{
- Nodes: []*acme.Node{},
- },
- &acme.Tree{
- Nodes: []*acme.Node{},
- },
- },
- },
- },
- Trees: []*acme.Tree{
- &acme.Tree{
- Nodes: []*acme.Node{
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{},
- Trees: []*acme.Tree{},
- },
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{},
- Trees: []*acme.Tree{},
- },
- },
- },
- &acme.Tree{
- Nodes: []*acme.Node{
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{},
- Trees: []*acme.Tree{},
- },
- &acme.Node{
- Name: "name",
- Nodes: []*acme.Node{},
- Trees: []*acme.Tree{},
- },
- },
- },
- },
- },
- Directory: &acme.Directory{
- Name: "name",
- Files: []*acme.File{
- &acme.File{
- Name: "name",
- Contents: "contents",
- },
- &acme.File{
- Name: "name",
- Contents: "contents",
- },
- },
- Directories: []*acme.Directory{
- &acme.Directory{
- Name: "name",
- Files: []*acme.File{
- &acme.File{
- Name: "name",
- Contents: "contents",
- },
- &acme.File{
- Name: "name",
- Contents: "contents",
- },
- },
- Directories: []*acme.Directory{
- &acme.Directory{
- Name: "name",
- Files: []*acme.File{},
- Directories: []*acme.Directory{},
- },
- &acme.Directory{
- Name: "name",
- Files: []*acme.File{},
- Directories: []*acme.Directory{},
- },
- },
- },
- &acme.Directory{
- Name: "name",
- Files: []*acme.File{
- &acme.File{
- Name: "name",
- Contents: "contents",
- },
- &acme.File{
- Name: "name",
- Contents: "contents",
- },
- },
- Directories: []*acme.Directory{
- &acme.Directory{
- Name: "name",
- Files: []*acme.File{},
- Directories: []*acme.Directory{},
- },
- &acme.Directory{
- Name: "name",
- Files: []*acme.File{},
- Directories: []*acme.Directory{},
- },
- },
- },
- },
- },
- Moment: &acme.Moment{
- ID: uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- Date: acme.MustParseDateTime(
- "2023-01-15",
- ),
- Datetime: acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- },
- },
- )
-}
-"
-`;
-
-exports[`test definitions > exhaustive 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Container.GetAndReturnListOfPrimitives(
- context.TODO(),
- []string{
- "string",
- "string",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Container.GetAndReturnListOfObjects(
- context.TODO(),
- []*types.ObjectWithRequiredField{
- &types.ObjectWithRequiredField{
- String: "string",
- },
- &types.ObjectWithRequiredField{
- String: "string",
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Container.GetAndReturnSetOfPrimitives(
- context.TODO(),
- []string{
- "string",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Container.GetAndReturnSetOfObjects(
- context.TODO(),
- []*types.ObjectWithRequiredField{
- &types.ObjectWithRequiredField{
- String: "string",
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Container.GetAndReturnMapPrimToPrim(
- context.TODO(),
- map[string]string{
- "string": "string",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Container.GetAndReturnMapOfPrimToObject(
- context.TODO(),
- map[string]*types.ObjectWithRequiredField{
- "string": &types.ObjectWithRequiredField{
- String: "string",
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Container.GetAndReturnOptional(
- context.TODO(),
- &types.ObjectWithRequiredField{
- String: "string",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.ContentType.PostJSONPatchContentType(
- context.TODO(),
- &types.ObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- Integer: acme.Int(
- 1,
- ),
- Long: acme.Int64(
- 1000000,
- ),
- Double: acme.Float64(
- 1.1,
- ),
- Bool: acme.Bool(
- true,
- ),
- Datetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Date: acme.Time(
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- ),
- UUID: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- Base64: []byte("SGVsbG8gd29ybGQh"),
- List: []string{
- "list",
- "list",
- },
- Set: []string{
- "set",
- },
- Map: map[int]string{
- 1: "map",
- },
- Bigint: acme.String(
- "1000000",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.ContentType.PostJSONPatchContentWithCharsetType(
- context.TODO(),
- &types.ObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- Integer: acme.Int(
- 1,
- ),
- Long: acme.Int64(
- 1000000,
- ),
- Double: acme.Float64(
- 1.1,
- ),
- Bool: acme.Bool(
- true,
- ),
- Datetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Date: acme.Time(
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- ),
- UUID: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- Base64: []byte("SGVsbG8gd29ybGQh"),
- List: []string{
- "list",
- "list",
- },
- Set: []string{
- "set",
- },
- Map: map[int]string{
- 1: "map",
- },
- Bigint: acme.String(
- "1000000",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Enum.GetAndReturnEnum(
- context.TODO(),
- types.WeatherReportSunny,
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.HTTPMethods.TestGet(
- context.TODO(),
- "id",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.HTTPMethods.TestPost(
- context.TODO(),
- &types.ObjectWithRequiredField{
- String: "string",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.HTTPMethods.TestPut(
- context.TODO(),
- "id",
- &types.ObjectWithRequiredField{
- String: "string",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.HTTPMethods.TestPatch(
- context.TODO(),
- "id",
- &types.ObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- Integer: acme.Int(
- 1,
- ),
- Long: acme.Int64(
- 1000000,
- ),
- Double: acme.Float64(
- 1.1,
- ),
- Bool: acme.Bool(
- true,
- ),
- Datetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Date: acme.Time(
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- ),
- UUID: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- Base64: []byte("SGVsbG8gd29ybGQh"),
- List: []string{
- "list",
- "list",
- },
- Set: []string{
- "set",
- },
- Map: map[int]string{
- 1: "map",
- },
- Bigint: acme.String(
- "1000000",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.HTTPMethods.TestDelete(
- context.TODO(),
- "id",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Object.GetAndReturnWithOptionalField(
- context.TODO(),
- &types.ObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- Integer: acme.Int(
- 1,
- ),
- Long: acme.Int64(
- 1000000,
- ),
- Double: acme.Float64(
- 1.1,
- ),
- Bool: acme.Bool(
- true,
- ),
- Datetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Date: acme.Time(
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- ),
- UUID: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- Base64: []byte("SGVsbG8gd29ybGQh"),
- List: []string{
- "list",
- "list",
- },
- Set: []string{
- "set",
- },
- Map: map[int]string{
- 1: "map",
- },
- Bigint: acme.String(
- "1000000",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Object.GetAndReturnWithRequiredField(
- context.TODO(),
- &types.ObjectWithRequiredField{
- String: "string",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Object.GetAndReturnWithMapOfMap(
- context.TODO(),
- &types.ObjectWithMapOfMap{
- Map: map[string]map[string]string{
- "map": map[string]string{
- "map": "map",
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Object.GetAndReturnNestedWithOptionalField(
- context.TODO(),
- &types.NestedObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- NestedObject: &types.ObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- Integer: acme.Int(
- 1,
- ),
- Long: acme.Int64(
- 1000000,
- ),
- Double: acme.Float64(
- 1.1,
- ),
- Bool: acme.Bool(
- true,
- ),
- Datetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Date: acme.Time(
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- ),
- UUID: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- Base64: []byte("SGVsbG8gd29ybGQh"),
- List: []string{
- "list",
- "list",
- },
- Set: []string{
- "set",
- },
- Map: map[int]string{
- 1: "map",
- },
- Bigint: acme.String(
- "1000000",
- ),
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Object.GetAndReturnNestedWithRequiredField(
- context.TODO(),
- "string",
- &types.NestedObjectWithRequiredField{
- String: "string",
- NestedObject: &types.ObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- Integer: acme.Int(
- 1,
- ),
- Long: acme.Int64(
- 1000000,
- ),
- Double: acme.Float64(
- 1.1,
- ),
- Bool: acme.Bool(
- true,
- ),
- Datetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Date: acme.Time(
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- ),
- UUID: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- Base64: []byte("SGVsbG8gd29ybGQh"),
- List: []string{
- "list",
- "list",
- },
- Set: []string{
- "set",
- },
- Map: map[int]string{
- 1: "map",
- },
- Bigint: acme.String(
- "1000000",
- ),
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Object.GetAndReturnNestedWithRequiredFieldAsList(
- context.TODO(),
- []*types.NestedObjectWithRequiredField{
- &types.NestedObjectWithRequiredField{
- String: "string",
- NestedObject: &types.ObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- Integer: acme.Int(
- 1,
- ),
- Long: acme.Int64(
- 1000000,
- ),
- Double: acme.Float64(
- 1.1,
- ),
- Bool: acme.Bool(
- true,
- ),
- Datetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Date: acme.Time(
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- ),
- UUID: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- Base64: []byte("SGVsbG8gd29ybGQh"),
- List: []string{
- "list",
- "list",
- },
- Set: []string{
- "set",
- },
- Map: map[int]string{
- 1: "map",
- },
- Bigint: acme.String(
- "1000000",
- ),
- },
- },
- &types.NestedObjectWithRequiredField{
- String: "string",
- NestedObject: &types.ObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- Integer: acme.Int(
- 1,
- ),
- Long: acme.Int64(
- 1000000,
- ),
- Double: acme.Float64(
- 1.1,
- ),
- Bool: acme.Bool(
- true,
- ),
- Datetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Date: acme.Time(
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- ),
- UUID: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- Base64: []byte("SGVsbG8gd29ybGQh"),
- List: []string{
- "list",
- "list",
- },
- Set: []string{
- "set",
- },
- Map: map[int]string{
- 1: "map",
- },
- Bigint: acme.String(
- "1000000",
- ),
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Params.GetWithPath(
- context.TODO(),
- "param",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- endpoints "github.com/acme/acme-go/endpoints"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Params.GetWithQuery(
- context.TODO(),
- &endpoints.GetWithQuery{
- Query: "query",
- Number: 1,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- endpoints "github.com/acme/acme-go/endpoints"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Params.GetWithAllowMultipleQuery(
- context.TODO(),
- &endpoints.GetWithMultipleQuery{
- Query: []string{
- "query",
- },
- Numer: []int{
- 1,
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- endpoints "github.com/acme/acme-go/endpoints"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Params.GetWithPathAndQuery(
- context.TODO(),
- "param",
- &endpoints.GetWithPathAndQuery{
- Query: "query",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Params.ModifyWithPath(
- context.TODO(),
- "param",
- "string",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Primitive.GetAndReturnString(
- context.TODO(),
- "string",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Primitive.GetAndReturnInt(
- context.TODO(),
- 1,
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Primitive.GetAndReturnLong(
- context.TODO(),
- 1000000,
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Primitive.GetAndReturnDouble(
- context.TODO(),
- 1.1,
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Primitive.GetAndReturnBool(
- context.TODO(),
- true,
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Primitive.GetAndReturnDatetime(
- context.TODO(),
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Primitive.GetAndReturnDate(
- context.TODO(),
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Primitive.GetAndReturnUUID(
- context.TODO(),
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Primitive.GetAndReturnBase64(
- context.TODO(),
- []byte("SGVsbG8gd29ybGQh"),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Endpoints.Union.GetAndReturnUnion(
- context.TODO(),
- &types.Animal{
- Dog: &types.Dog{
- Name: "name",
- LikesToWoof: true,
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- types "github.com/acme/acme-go/types"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.InlinedRequests.PostWithObjectBodyandResponse(
- context.TODO(),
- &acme.PostWithObjectBody{
- String: "string",
- Integer: 1,
- NestedObject: &types.ObjectWithOptionalField{
- String: acme.String(
- "string",
- ),
- Integer: acme.Int(
- 1,
- ),
- Long: acme.Int64(
- 1000000,
- ),
- Double: acme.Float64(
- 1.1,
- ),
- Bool: acme.Bool(
- true,
- ),
- Datetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Date: acme.Time(
- acme.MustParseDateTime(
- "2023-01-15",
- ),
- ),
- UUID: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- Base64: []byte("SGVsbG8gd29ybGQh"),
- List: []string{
- "list",
- "list",
- },
- Set: []string{
- "set",
- },
- Map: map[int]string{
- 1: "map",
- },
- Bigint: acme.String(
- "1000000",
- ),
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.NoAuth.PostWithNoAuth(
- context.TODO(),
- map[string]interface{}{
- "key": "value",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.NoReqBody.GetWithNoRequestBody(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.NoReqBody.PostWithNoRequestBody(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.ReqWithHeaders.GetWithCustomHeader(
- context.TODO(),
- &acme.ReqWithHeaders{
- XTestServiceHeader: "X-TEST-SERVICE-HEADER",
- XTestEndpointHeader: "X-TEST-ENDPOINT-HEADER",
- Body: "string",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > extends 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.ExtendedInlineRequestBody(
- context.TODO(),
- &acme.Inlined{
- Unique: "unique",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > extra-properties 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.CreateUser(
- context.TODO(),
- &acme.CreateUserRequest{
- Name: "name",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > file-download 1`] = `""`;
-
-exports[`test definitions > file-upload 1`] = `""`;
-
-exports[`test definitions > folders 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Foo(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Foo(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Foo(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Foo(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Folder.Service.Endpoint(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Folder.Service.UnknownRequest(
- context.TODO(),
- map[string]interface{}{
- "key": "value",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > go-content-type 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Imdb.CreateMovie(
- context.TODO(),
- &acme.CreateMovieRequest{
- Title: "title",
- Rating: 1.1,
- },
- )
-}
-"
-`;
-
-exports[`test definitions > idempotency-headers 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Payment.Create(
- context.TODO(),
- &acme.CreatePaymentRequest{
- Amount: 1,
- Currency: acme.CurrencyUsd,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Payment.Delete(
- context.TODO(),
- "paymentId",
- )
-}
-"
-`;
-
-exports[`test definitions > imdb 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Imdb.CreateMovie(
- context.TODO(),
- &acme.CreateMovieRequest{
- Title: "title",
- Rating: 1.1,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Imdb.GetMovie(
- context.TODO(),
- "movieId",
- )
-}
-"
-`;
-
-exports[`test definitions > license 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Get(
- context.TODO(),
- )
-}
-"
-`;
-
-exports[`test definitions > literal 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Headers.Send(
- context.TODO(),
- &acme.SendLiteralsInHeadersRequest{
- Query: "What is the weather today",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Headers.Send(
- context.TODO(),
- &acme.SendLiteralsInHeadersRequest{
- Query: "query",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Inlined.Send(
- context.TODO(),
- &acme.SendLiteralsInlinedRequest{
- Temperature: acme.Float64(
- 10.1,
- ),
- ObjectWithLiteral: &acme.ATopLevelLiteral{
- NestedLiteral: &acme.ANestedLiteral{},
- },
- Query: "What is the weather today",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Inlined.Send(
- context.TODO(),
- &acme.SendLiteralsInlinedRequest{
- Query: "query",
- Temperature: acme.Float64(
- 1.1,
- ),
- ObjectWithLiteral: &acme.ATopLevelLiteral{
- NestedLiteral: &acme.ANestedLiteral{},
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Path.Send(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Path.Send(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Query.Send(
- context.TODO(),
- &acme.SendLiteralsInQueryRequest{
- Query: "What is the weather today",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Query.Send(
- context.TODO(),
- &acme.SendLiteralsInQueryRequest{
- Query: "query",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Reference.Send(
- context.TODO(),
- &acme.SendRequest{
- Query: "What is the weather today",
- ContainerObject: &acme.ContainerObject{
- NestedObjects: []*acme.NestedObjectWithLiterals{
- &acme.NestedObjectWithLiterals{
- StrProp: "strProp",
- },
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Reference.Send(
- context.TODO(),
- &acme.SendRequest{
- Query: "query",
- ContainerObject: &acme.ContainerObject{
- NestedObjects: []*acme.NestedObjectWithLiterals{
- &acme.NestedObjectWithLiterals{
- StrProp: "strProp",
- },
- &acme.NestedObjectWithLiterals{
- StrProp: "strProp",
- },
- },
- },
- },
- )
-}
-"
-`;
-
-exports[`test definitions > mixed-case 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.GetResource(
- context.TODO(),
- "rsc-xyz",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.GetResource(
- context.TODO(),
- "ResourceID",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.ListResources(
- context.TODO(),
- &acme.ListResourcesRequest{
- PageLimit: 10,
- BeforeDate: acme.MustParseDateTime(
- "2023-01-01",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.ListResources(
- context.TODO(),
- &acme.ListResourcesRequest{
- PageLimit: 1,
- BeforeDate: acme.MustParseDateTime(
- "2023-01-15",
- ),
- },
- )
-}
-"
-`;
-
-exports[`test definitions > mixed-file-directory 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Organization.Create(
- context.TODO(),
- &acme.CreateOrganizationRequest{
- Name: "name",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.List(
- context.TODO(),
- &acme.ListUsersRequest{
- Limit: acme.Int(
- 1,
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- user "github.com/acme/acme-go/user"
-)
-
-func do() {
- client := client.NewClient()
- client.User.Events.ListEvents(
- context.TODO(),
- &user.ListUserEventsRequest{
- Limit: acme.Int(
- 1,
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- events "github.com/acme/acme-go/user/events"
-)
-
-func do() {
- client := client.NewClient()
- client.User.Events.Metadata.GetMetadata(
- context.TODO(),
- &events.GetEventMetadataRequest{
- ID: "id",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > multi-line-docs 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.GetUser(
- context.TODO(),
- "userId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.CreateUser(
- context.TODO(),
- &acme.CreateUserRequest{
- Name: "name",
- Age: acme.Int(
- 1,
- ),
- },
- )
-}
-"
-`;
-
-exports[`test definitions > multi-url-environment 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Ec2.BootInstance(
- context.TODO(),
- &acme.BootInstanceRequest{
- Size: "size",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.S3.GetPresignedURL(
- context.TODO(),
- &acme.GetPresignedURLRequest{
- S3Key: "s3Key",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > multi-url-environment-no-default 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Ec2.BootInstance(
- context.TODO(),
- &acme.BootInstanceRequest{
- Size: "size",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.S3.GetPresignedURL(
- context.TODO(),
- &acme.GetPresignedURLRequest{
- S3Key: "s3Key",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > no-environment 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Dummy.GetDummy(
- context.TODO(),
- )
-}
-"
-`;
-
-exports[`test definitions > oauth-client-credentials 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Auth.GetTokenWithClientCredentials(
- context.TODO(),
- &acme.GetTokenRequest{
- ClientID: "client_id",
- ClientSecret: "client_secret",
- Scope: acme.String(
- "scope",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Auth.RefreshToken(
- context.TODO(),
- &acme.RefreshTokenRequest{
- ClientID: "client_id",
- ClientSecret: "client_secret",
- RefreshToken: "refresh_token",
- Scope: acme.String(
- "scope",
- ),
- },
- )
-}
-"
-`;
-
-exports[`test definitions > oauth-client-credentials-default 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Auth.GetToken(
- context.TODO(),
- &acme.GetTokenRequest{
- ClientID: "client_id",
- ClientSecret: "client_secret",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > oauth-client-credentials-environment-variables 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Auth.GetTokenWithClientCredentials(
- context.TODO(),
- &acme.GetTokenRequest{
- ClientID: "client_id",
- ClientSecret: "client_secret",
- Scope: acme.String(
- "scope",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Auth.RefreshToken(
- context.TODO(),
- &acme.RefreshTokenRequest{
- ClientID: "client_id",
- ClientSecret: "client_secret",
- RefreshToken: "refresh_token",
- Scope: acme.String(
- "scope",
- ),
- },
- )
-}
-"
-`;
-
-exports[`test definitions > oauth-client-credentials-nested-root 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- auth "github.com/acme/acme-go/auth"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Auth.GetToken(
- context.TODO(),
- &auth.GetTokenRequest{
- ClientID: "client_id",
- ClientSecret: "client_secret",
- Scope: acme.String(
- "scope",
- ),
- },
- )
-}
-"
-`;
-
-exports[`test definitions > object 1`] = `""`;
-
-exports[`test definitions > objects-with-imports 1`] = `""`;
-
-exports[`test definitions > optional 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Optional.SendOptionalBody(
- context.TODO(),
- map[string]interface{}{
- "string": map[string]interface{}{
- "key": "value",
- },
- },
- )
-}
-"
-`;
-
-exports[`test definitions > package-yml 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Echo(
- context.TODO(),
- "id-ksfd9c1",
- &acme.EchoRequest{
- Name: "Hello world!",
- Size: 20,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Echo(
- context.TODO(),
- "id",
- &acme.EchoRequest{
- Name: "name",
- Size: 1,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.Nop(
- context.TODO(),
- "id-a2ijs82",
- "id-219xca8",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.Nop(
- context.TODO(),
- "id",
- "nestedId",
- )
-}
-"
-`;
-
-exports[`test definitions > pagination 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithCursorPagination(
- context.TODO(),
- &acme.ListUsersCursorPaginationRequest{
- Page: acme.Int(
- 1,
- ),
- PerPage: acme.Int(
- 1,
- ),
- Order: acme.OrderAsc.Ptr(),
- StartingAfter: acme.String(
- "starting_after",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithBodyCursorPagination(
- context.TODO(),
- &acme.ListUsersBodyCursorPaginationRequest{
- Pagination: &acme.WithCursor{
- Cursor: acme.String(
- "cursor",
- ),
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithCursorPagination(
- context.TODO(),
- &acme.ListUsersCursorPaginationRequest{
- Page: acme.Int(
- 1,
- ),
- PerPage: acme.Int(
- 1,
- ),
- Order: acme.OrderAsc.Ptr(),
- StartingAfter: acme.String(
- "starting_after",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithBodyOffsetPagination(
- context.TODO(),
- &acme.ListUsersBodyOffsetPaginationRequest{
- Pagination: &acme.WithPage{
- Page: acme.Int(
- 1,
- ),
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithOffsetStepPagination(
- context.TODO(),
- &acme.ListUsersOffsetStepPaginationRequest{
- Page: acme.Int(
- 1,
- ),
- Limit: acme.Int(
- 1,
- ),
- Order: acme.OrderAsc.Ptr(),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithOffsetStepPagination(
- context.TODO(),
- &acme.ListUsersOffsetStepPaginationRequest{
- Page: acme.Int(
- 1,
- ),
- Limit: acme.Int(
- 1,
- ),
- Order: acme.OrderAsc.Ptr(),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithExtendedResults(
- context.TODO(),
- &acme.ListUsersExtendedRequest{
- Cursor: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithExtendedResults(
- context.TODO(),
- &acme.ListUsersExtendedRequest{
- Cursor: acme.UUID(
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithCursorPagination(
- context.TODO(),
- &acme.ListUsersCursorPaginationRequest{
- StartingAfter: acme.String(
- "starting_after",
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Users.ListWithGlobalConfig(
- context.TODO(),
- &acme.ListWithGlobalConfigRequest{
- Offset: acme.Int(
- 1,
- ),
- },
- )
-}
-"
-`;
-
-exports[`test definitions > path-parameters 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.GetOrganization(
- context.TODO(),
- "organizationId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.GetUser(
- context.TODO(),
- "userId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.GetOrganizationUser(
- context.TODO(),
- "organizationId",
- "userId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.SearchUsers(
- context.TODO(),
- "userId",
- &acme.SearchUsersRequest{
- Limit: acme.Int(
- 1,
- ),
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.SearchOrganizations(
- context.TODO(),
- "organizationId",
- &acme.SearchOrganizationsRequest{
- Limit: acme.Int(
- 1,
- ),
- },
- )
-}
-"
-`;
-
-exports[`test definitions > plain-text 1`] = `""`;
-
-exports[`test definitions > query-parameters 1`] = `""`;
-
-exports[`test definitions > reserved-keywords 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Package.Test(
- context.TODO(),
- &acme.TestRequest{
- For: "for",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > response-property 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.GetMovie(
- context.TODO(),
- "string",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.GetMovie(
- context.TODO(),
- "string",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.GetMovie(
- context.TODO(),
- "string",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.GetMovie(
- context.TODO(),
- "string",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.GetMovie(
- context.TODO(),
- "string",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.GetMovie(
- context.TODO(),
- "string",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.GetMovie(
- context.TODO(),
- "string",
- )
-}
-"
-`;
-
-exports[`test definitions > server-sent-event-examples 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Completions.Stream(
- context.TODO(),
- &acme.StreamCompletionRequest{
- Query: "foo",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > server-sent-events 1`] = `""`;
-
-exports[`test definitions > simple-fhir 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.GetAccount(
- context.TODO(),
- "account_id",
- )
-}
-"
-`;
-
-exports[`test definitions > single-url-environment-default 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Dummy.GetDummy(
- context.TODO(),
- )
-}
-"
-`;
-
-exports[`test definitions > single-url-environment-no-default 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Dummy.GetDummy(
- context.TODO(),
- )
-}
-"
-`;
-
-exports[`test definitions > streaming 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dummy.Generate(
- context.TODO(),
- &acme.Generateequest{
- NumEvents: 5,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dummy.Generate(
- context.TODO(),
- &acme.Generateequest{
- NumEvents: 1,
- },
- )
-}
-"
-`;
-
-exports[`test definitions > streaming-parameter 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Dummy.Generate(
- context.TODO(),
- &acme.GenerateRequest{
- Stream: false,
- NumEvents: 5,
- },
- )
-}
-"
-`;
-
-exports[`test definitions > trace 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.V2.Test(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Admin.UpdateTestSubmissionStatus(
- context.TODO(),
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- &acme.TestSubmissionStatus{
- Stopped: "stopped",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Admin.SendTestSubmissionUpdate(
- context.TODO(),
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- &acme.TestSubmissionUpdate{
- UpdateTime: acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- UpdateInfo: &acme.TestSubmissionUpdateInfo{},
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Admin.UpdateWorkspaceSubmissionStatus(
- context.TODO(),
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- &acme.WorkspaceSubmissionStatus{
- Stopped: "stopped",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Admin.SendWorkspaceSubmissionUpdate(
- context.TODO(),
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- &acme.WorkspaceSubmissionUpdate{
- UpdateTime: acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- UpdateInfo: &acme.WorkspaceSubmissionUpdateInfo{},
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Admin.StoreTracedTestCase(
- context.TODO(),
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- "testCaseId",
- &acme.StoreTracedTestCaseRequest{
- Result: &acme.TestCaseResultWithStdout{
- Result: &acme.TestCaseResult{
- ExpectedResult: &acme.VariableValue{},
- ActualResult: &acme.ActualResult{
- Value: &acme.VariableValue{},
- },
- Passed: true,
- },
- Stdout: "stdout",
- },
- TraceResponses: []*acme.TraceResponse{
- &acme.TraceResponse{
- SubmissionID: uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- LineNumber: 1,
- ReturnValue: &acme.DebugVariableValue{},
- ExpressionLocation: &acme.ExpressionLocation{
- Start: 1,
- Offset: 1,
- },
- Stack: &acme.StackInformation{
- NumStackFrames: 1,
- TopStackFrame: &acme.StackFrame{
- MethodName: "methodName",
- LineNumber: 1,
- Scopes: []*acme.Scope{
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- },
- },
- },
- Stdout: acme.String(
- "stdout",
- ),
- },
- &acme.TraceResponse{
- SubmissionID: uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- LineNumber: 1,
- ReturnValue: &acme.DebugVariableValue{},
- ExpressionLocation: &acme.ExpressionLocation{
- Start: 1,
- Offset: 1,
- },
- Stack: &acme.StackInformation{
- NumStackFrames: 1,
- TopStackFrame: &acme.StackFrame{
- MethodName: "methodName",
- LineNumber: 1,
- Scopes: []*acme.Scope{
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- },
- },
- },
- Stdout: acme.String(
- "stdout",
- ),
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Admin.StoreTracedTestCaseV2(
- context.TODO(),
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- "testCaseId",
- []*acme.TraceResponseV2{
- &acme.TraceResponseV2{
- SubmissionID: uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- LineNumber: 1,
- File: &acme.TracedFile{
- Filename: "filename",
- Directory: "directory",
- },
- ReturnValue: &acme.DebugVariableValue{},
- ExpressionLocation: &acme.ExpressionLocation{
- Start: 1,
- Offset: 1,
- },
- Stack: &acme.StackInformation{
- NumStackFrames: 1,
- TopStackFrame: &acme.StackFrame{
- MethodName: "methodName",
- LineNumber: 1,
- Scopes: []*acme.Scope{
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- },
- },
- },
- Stdout: acme.String(
- "stdout",
- ),
- },
- &acme.TraceResponseV2{
- SubmissionID: uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- LineNumber: 1,
- File: &acme.TracedFile{
- Filename: "filename",
- Directory: "directory",
- },
- ReturnValue: &acme.DebugVariableValue{},
- ExpressionLocation: &acme.ExpressionLocation{
- Start: 1,
- Offset: 1,
- },
- Stack: &acme.StackInformation{
- NumStackFrames: 1,
- TopStackFrame: &acme.StackFrame{
- MethodName: "methodName",
- LineNumber: 1,
- Scopes: []*acme.Scope{
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- },
- },
- },
- Stdout: acme.String(
- "stdout",
- ),
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Admin.StoreTracedWorkspace(
- context.TODO(),
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- &acme.StoreTracedWorkspaceRequest{
- WorkspaceRunDetails: &acme.WorkspaceRunDetails{
- ExceptionV2: &acme.ExceptionV2{
- Generic: &acme.ExceptionInfo{
- ExceptionType: "exceptionType",
- ExceptionMessage: "exceptionMessage",
- ExceptionStacktrace: "exceptionStacktrace",
- },
- },
- Exception: &acme.ExceptionInfo{
- ExceptionType: "exceptionType",
- ExceptionMessage: "exceptionMessage",
- ExceptionStacktrace: "exceptionStacktrace",
- },
- Stdout: "stdout",
- },
- TraceResponses: []*acme.TraceResponse{
- &acme.TraceResponse{
- SubmissionID: uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- LineNumber: 1,
- ReturnValue: &acme.DebugVariableValue{},
- ExpressionLocation: &acme.ExpressionLocation{
- Start: 1,
- Offset: 1,
- },
- Stack: &acme.StackInformation{
- NumStackFrames: 1,
- TopStackFrame: &acme.StackFrame{
- MethodName: "methodName",
- LineNumber: 1,
- Scopes: []*acme.Scope{
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- },
- },
- },
- Stdout: acme.String(
- "stdout",
- ),
- },
- &acme.TraceResponse{
- SubmissionID: uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- LineNumber: 1,
- ReturnValue: &acme.DebugVariableValue{},
- ExpressionLocation: &acme.ExpressionLocation{
- Start: 1,
- Offset: 1,
- },
- Stack: &acme.StackInformation{
- NumStackFrames: 1,
- TopStackFrame: &acme.StackFrame{
- MethodName: "methodName",
- LineNumber: 1,
- Scopes: []*acme.Scope{
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- },
- },
- },
- Stdout: acme.String(
- "stdout",
- ),
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
- uuid "github.com/google/uuid"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Admin.StoreTracedWorkspaceV2(
- context.TODO(),
- uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- []*acme.TraceResponseV2{
- &acme.TraceResponseV2{
- SubmissionID: uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- LineNumber: 1,
- File: &acme.TracedFile{
- Filename: "filename",
- Directory: "directory",
- },
- ReturnValue: &acme.DebugVariableValue{},
- ExpressionLocation: &acme.ExpressionLocation{
- Start: 1,
- Offset: 1,
- },
- Stack: &acme.StackInformation{
- NumStackFrames: 1,
- TopStackFrame: &acme.StackFrame{
- MethodName: "methodName",
- LineNumber: 1,
- Scopes: []*acme.Scope{
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- },
- },
- },
- Stdout: acme.String(
- "stdout",
- ),
- },
- &acme.TraceResponseV2{
- SubmissionID: uuid.MustParse(
- "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
- ),
- LineNumber: 1,
- File: &acme.TracedFile{
- Filename: "filename",
- Directory: "directory",
- },
- ReturnValue: &acme.DebugVariableValue{},
- ExpressionLocation: &acme.ExpressionLocation{
- Start: 1,
- Offset: 1,
- },
- Stack: &acme.StackInformation{
- NumStackFrames: 1,
- TopStackFrame: &acme.StackFrame{
- MethodName: "methodName",
- LineNumber: 1,
- Scopes: []*acme.Scope{
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- &acme.Scope{
- Variables: map[string]*acme.DebugVariableValue{
- "variables": &acme.DebugVariableValue{},
- },
- },
- },
- },
- },
- Stdout: acme.String(
- "stdout",
- ),
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Homepage.GetHomepageProblems(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Homepage.SetHomepageProblems(
- context.TODO(),
- []acme.ProblemID{
- "string",
- "string",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Migration.GetAttemptedMigrations(
- context.TODO(),
- &acme.GetAttemptedMigrationsRequest{
- AdminKeyHeader: "admin-key-header",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Playlist.CreatePlaylist(
- context.TODO(),
- 1,
- &acme.CreatePlaylistRequest{
- Datetime: acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- OptionalDatetime: acme.Time(
- acme.MustParseDateTime(
- "2024-01-15T09:30:00Z",
- ),
- ),
- Body: &acme.PlaylistCreateRequest{
- Name: "name",
- Problems: []acme.ProblemID{
- "problems",
- "problems",
- },
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Playlist.GetPlaylists(
- context.TODO(),
- 1,
- &acme.GetPlaylistsRequest{
- Limit: acme.Int(
- 1,
- ),
- OtherField: "otherField",
- MultiLineDocs: "multiLineDocs",
- OptionalMultipleField: []*string{
- acme.String(
- "optionalMultipleField",
- ),
- },
- MultipleField: []string{
- "multipleField",
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Playlist.GetPlaylist(
- context.TODO(),
- 1,
- "playlistId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Playlist.UpdatePlaylist(
- context.TODO(),
- 1,
- "playlistId",
- &acme.UpdatePlaylistRequest{
- Name: "name",
- Problems: []acme.ProblemID{
- "problems",
- "problems",
- },
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Playlist.DeletePlaylist(
- context.TODO(),
- 1,
- "playlist_id",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Problem.CreateProblem(
- context.TODO(),
- &acme.CreateProblemRequest{
- ProblemName: "problemName",
- ProblemDescription: &acme.ProblemDescription{
- Boards: []*acme.ProblemDescriptionBoard{
- &acme.ProblemDescriptionBoard{},
- &acme.ProblemDescriptionBoard{},
- },
- },
- Files: map[acme.Language]*acme.ProblemFiles{
- acme.LanguageJava: &acme.ProblemFiles{
- SolutionFile: &acme.FileInfo{
- Filename: "filename",
- Contents: "contents",
- },
- ReadOnlyFiles: []*acme.FileInfo{
- &acme.FileInfo{
- Filename: "filename",
- Contents: "contents",
- },
- &acme.FileInfo{
- Filename: "filename",
- Contents: "contents",
- },
- },
- },
- },
- InputParams: []*acme.VariableTypeAndName{
- &acme.VariableTypeAndName{
- VariableType: &acme.VariableType{
- IntegerType: "integerType",
- },
- Name: "name",
- },
- &acme.VariableTypeAndName{
- VariableType: &acme.VariableType{
- IntegerType: "integerType",
- },
- Name: "name",
- },
- },
- OutputType: &acme.VariableType{
- IntegerType: "integerType",
- },
- Testcases: []*acme.TestCaseWithExpectedResult{
- &acme.TestCaseWithExpectedResult{
- TestCase: &acme.TestCase{
- ID: "id",
- Params: []*acme.VariableValue{
- &acme.VariableValue{},
- &acme.VariableValue{},
- },
- },
- ExpectedResult: &acme.VariableValue{},
- },
- &acme.TestCaseWithExpectedResult{
- TestCase: &acme.TestCase{
- ID: "id",
- Params: []*acme.VariableValue{
- &acme.VariableValue{},
- &acme.VariableValue{},
- },
- },
- ExpectedResult: &acme.VariableValue{},
- },
- },
- MethodName: "methodName",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Problem.UpdateProblem(
- context.TODO(),
- "problemId",
- &acme.CreateProblemRequest{
- ProblemName: "problemName",
- ProblemDescription: &acme.ProblemDescription{
- Boards: []*acme.ProblemDescriptionBoard{
- &acme.ProblemDescriptionBoard{},
- &acme.ProblemDescriptionBoard{},
- },
- },
- Files: map[acme.Language]*acme.ProblemFiles{
- acme.LanguageJava: &acme.ProblemFiles{
- SolutionFile: &acme.FileInfo{
- Filename: "filename",
- Contents: "contents",
- },
- ReadOnlyFiles: []*acme.FileInfo{
- &acme.FileInfo{
- Filename: "filename",
- Contents: "contents",
- },
- &acme.FileInfo{
- Filename: "filename",
- Contents: "contents",
- },
- },
- },
- },
- InputParams: []*acme.VariableTypeAndName{
- &acme.VariableTypeAndName{
- VariableType: &acme.VariableType{
- IntegerType: "integerType",
- },
- Name: "name",
- },
- &acme.VariableTypeAndName{
- VariableType: &acme.VariableType{
- IntegerType: "integerType",
- },
- Name: "name",
- },
- },
- OutputType: &acme.VariableType{
- IntegerType: "integerType",
- },
- Testcases: []*acme.TestCaseWithExpectedResult{
- &acme.TestCaseWithExpectedResult{
- TestCase: &acme.TestCase{
- ID: "id",
- Params: []*acme.VariableValue{
- &acme.VariableValue{},
- &acme.VariableValue{},
- },
- },
- ExpectedResult: &acme.VariableValue{},
- },
- &acme.TestCaseWithExpectedResult{
- TestCase: &acme.TestCase{
- ID: "id",
- Params: []*acme.VariableValue{
- &acme.VariableValue{},
- &acme.VariableValue{},
- },
- },
- ExpectedResult: &acme.VariableValue{},
- },
- },
- MethodName: "methodName",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Problem.DeleteProblem(
- context.TODO(),
- "problemId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Problem.GetDefaultStarterFiles(
- context.TODO(),
- &acme.GetDefaultStarterFilesRequest{
- InputParams: []*acme.VariableTypeAndName{
- &acme.VariableTypeAndName{
- VariableType: &acme.VariableType{
- IntegerType: "integerType",
- },
- Name: "name",
- },
- &acme.VariableTypeAndName{
- VariableType: &acme.VariableType{
- IntegerType: "integerType",
- },
- Name: "name",
- },
- },
- OutputType: &acme.VariableType{
- IntegerType: "integerType",
- },
- MethodName: "methodName",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Submission.CreateExecutionSession(
- context.TODO(),
- acme.LanguageJava,
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Submission.GetExecutionSession(
- context.TODO(),
- "sessionId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Submission.StopExecutionSession(
- context.TODO(),
- "sessionId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Submission.GetExecutionSessionsState(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Sysprop.SetNumWarmInstances(
- context.TODO(),
- acme.LanguageJava,
- 1,
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Sysprop.GetNumWarmInstances(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.V2.Problem.GetLightweightProblems(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.V2.Problem.GetProblems(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.V2.Problem.GetLatestProblem(
- context.TODO(),
- "problemId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.V2.Problem.GetProblemVersion(
- context.TODO(),
- "problemId",
- 1,
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.V2.Problem.GetLightweightProblems(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.V2.Problem.GetProblems(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.V2.Problem.GetLatestProblem(
- context.TODO(),
- "problemId",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.V2.Problem.GetProblemVersion(
- context.TODO(),
- "problemId",
- 1,
- )
-}
-"
-`;
-
-exports[`test definitions > ts-express-casing 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Imdb.CreateMovie(
- context.TODO(),
- &acme.CreateMovieRequest{
- ID: "id",
- MovieTitle: "movie_title",
- MovieRating: 1.1,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
- option "github.com/acme/acme-go/option"
-)
-
-func do() {
- client := client.NewClient(
- option.WithToken(
- "",
- ),
- )
- client.Imdb.GetMovie(
- context.TODO(),
- "movie_id",
- )
-}
-"
-`;
-
-exports[`test definitions > undiscriminated-unions 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Union.Get(
- context.TODO(),
- &acme.MyUnion{
- String: "string",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Union.GetMetadata(
- context.TODO(),
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Union.GetMetadata(
- context.TODO(),
- )
-}
-"
-`;
-
-exports[`test definitions > unions 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Union.Get(
- context.TODO(),
- "id",
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Union.Update(
- context.TODO(),
- &acme.Shape{
- Circle: &acme.Circle{
- Radius: 1.1,
- },
- },
- )
-}
-"
-`;
-
-exports[`test definitions > unknown 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Unknown.Post(
- context.TODO(),
- map[string]interface{}{
- "key": "value",
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Unknown.PostObject(
- context.TODO(),
- &acme.MyObject{
- Unknown: map[string]interface{}{
- "key": "value",
- },
- },
- )
-}
-"
-`;
-
-exports[`test definitions > validation 1`] = `
-"package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Create(
- context.TODO(),
- &acme.CreateRequest{
- Decimal: 1.1,
- Even: 1,
- Name: "name",
- Shape: acme.ShapeSquare,
- },
- )
-}
-
-------------------------
-
-package example
-
-import (
- context "context"
- acme "github.com/acme/acme-go"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Get(
- context.TODO(),
- &acme.GetRequest{
- Decimal: 1.1,
- Even: 1,
- Name: "name",
- },
- )
-}
-"
-`;
-
-exports[`test definitions > variables 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.Service.Post(
- context.TODO(),
- "endpointParam",
- )
-}
-"
-`;
-
-exports[`test definitions > version 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.GetUser(
- context.TODO(),
- "userId",
- )
-}
-"
-`;
-
-exports[`test definitions > version-no-default 1`] = `
-"package example
-
-import (
- context "context"
- client "github.com/acme/acme-go/client"
-)
-
-func do() {
- client := client.NewClient()
- client.User.GetUser(
- context.TODO(),
- "userId",
- )
-}
-"
-`;
-
-exports[`test definitions > websocket 1`] = `""`;
diff --git a/generators/go-v2/dynamic-snippets/src/__test__/ir.test.ts b/generators/go-v2/dynamic-snippets/src/__test__/ir.test.ts
deleted file mode 100644
index ee8cb4bb7d8..00000000000
--- a/generators/go-v2/dynamic-snippets/src/__test__/ir.test.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import { AbsoluteFilePath, join, RelativeFilePath } from "@fern-api/fs-utils";
-import { loadApis } from "@fern-api/project-loader";
-import { createMockTaskContext } from "@fern-api/task-context";
-import path from "path";
-import { TestResult } from "./utils/TestResult";
-import { generateDynamicSnippetsTestSuite } from "@fern-api/dynamic-snippets";
-import { buildGeneratorConfig } from "./utils/buildGeneratorConfig";
-import { DynamicSnippetsGenerator } from "..";
-import { AbstractAPIWorkspace } from "@fern-api/workspace-loader";
-import { generateIntermediateRepresentation } from "@fern-api/ir-generator";
-import { IntermediateRepresentation } from "@fern-api/ir-sdk";
-import { GoFormatter } from "@fern-api/go-formatter";
-
-// eslint-disable-next-line @typescript-eslint/no-misused-promises
-describe("test definitions", async () => {
- const TEST_DEFINITIONS_DIR = path.join(__dirname, "../../../../../test-definitions");
- const apiWorkspaces = await loadApis({
- fernDirectory: join(AbsoluteFilePath.of(TEST_DEFINITIONS_DIR), RelativeFilePath.of("fern")),
- context: createMockTaskContext(),
- cliVersion: "0.0.0",
- cliName: "fern",
- commandLineApiWorkspace: undefined,
- defaultToAllApiWorkspaces: true
- });
-
- await Promise.all(
- apiWorkspaces.map(async (workspace) => {
- it(`${workspace.workspaceName}`, async () => {
- const test = await generateDynamicSnippetsTestSuite({
- ir: await getIntermediateRepresentation({ workspace }),
- config: buildGeneratorConfig()
- });
- const generator = new DynamicSnippetsGenerator({
- ir: test.ir,
- config: test.config,
- formatter: new GoFormatter()
- });
- const result = new TestResult();
- for (const request of test.requests) {
- const response = await generator.generate(request);
- result.addSnippet(response.snippet);
- }
- expect(result.toString()).toMatchSnapshot();
- });
- })
- );
-});
-
-async function getIntermediateRepresentation({
- workspace
-}: {
- workspace: AbstractAPIWorkspace;
-}): Promise {
- const context = createMockTaskContext();
- const fernWorkspace = await workspace.toFernWorkspace({
- context
- });
- return generateIntermediateRepresentation({
- workspace: fernWorkspace,
- generationLanguage: "go",
- keywords: undefined,
- smartCasing: true,
- disableExamples: false,
- includeOptionalRequestPropertyExamples: true,
- readme: undefined,
- packageName: undefined,
- version: undefined,
- audiences: { type: "all" },
- context
- });
-}
diff --git a/generators/go-v2/dynamic-snippets/src/__test__/utils/TestResult.ts b/generators/go-v2/dynamic-snippets/src/__test__/utils/TestResult.ts
deleted file mode 100644
index 0cd14d2832a..00000000000
--- a/generators/go-v2/dynamic-snippets/src/__test__/utils/TestResult.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-export class TestResult {
- public snippets: string[] = [];
-
- public addSnippet(snippet: string): void {
- this.snippets.push(snippet);
- }
-
- public toString(): string {
- if (this.snippets.length === 0) {
- return "";
- }
- let s = "";
- this.snippets.forEach((snippet, idx) => {
- if (idx > 0) {
- s += "\n------------------------\n\n";
- }
- s += snippet;
- });
- return s;
- }
-}
diff --git a/generators/go-v2/dynamic-snippets/src/__test__/utils/constant.ts b/generators/go-v2/dynamic-snippets/src/__test__/utils/constant.ts
index cf6c7dfe7d4..e270bb616d6 100644
--- a/generators/go-v2/dynamic-snippets/src/__test__/utils/constant.ts
+++ b/generators/go-v2/dynamic-snippets/src/__test__/utils/constant.ts
@@ -2,5 +2,8 @@ import path from "path";
import { AbsoluteFilePath } from "@fern-api/fs-utils";
export const DYNAMIC_IR_TEST_DEFINITIONS_DIRECTORY = AbsoluteFilePath.of(
- path.join(__dirname, "../../../../../../packages/cli/dynamic-snippets/src/__test__/test-definitions")
+ path.join(
+ __dirname,
+ "../../../../../../packages/cli/generation/ir-generator/src/dynamic-snippets/__test__/test-definitions"
+ )
);
diff --git a/generators/go-v2/dynamic-snippets/src/context/DynamicSnippetsGeneratorContext.ts b/generators/go-v2/dynamic-snippets/src/context/DynamicSnippetsGeneratorContext.ts
index 4466c56503a..98657015a4c 100644
--- a/generators/go-v2/dynamic-snippets/src/context/DynamicSnippetsGeneratorContext.ts
+++ b/generators/go-v2/dynamic-snippets/src/context/DynamicSnippetsGeneratorContext.ts
@@ -11,10 +11,9 @@ import { go } from "@fern-api/go-ast";
import path from "path";
import { ErrorReporter, Severity } from "./ErrorReporter";
import { FilePropertyMapper } from "./FilePropertyMapper";
+import { AbstractDynamicSnippetsGeneratorContext } from "@fern-api/generator-commons";
-export class DynamicSnippetsGeneratorContext {
- public ir: DynamicSnippets.DynamicIntermediateRepresentation;
- public config: FernGeneratorExec.config.GeneratorConfig;
+export class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGeneratorContext {
public customConfig: BaseGoCustomConfigSchema | undefined;
public errors: ErrorReporter;
public dynamicTypeMapper: DynamicTypeMapper;
@@ -31,8 +30,7 @@ export class DynamicSnippetsGeneratorContext {
ir: DynamicSnippets.DynamicIntermediateRepresentation;
config: FernGeneratorExec.config.GeneratorConfig;
}) {
- this.ir = ir;
- this.config = config;
+ super(ir, config);
this.customConfig = config.customConfig != null ? (config.customConfig as BaseGoCustomConfigSchema) : undefined;
this.errors = new ErrorReporter();
this.dynamicTypeMapper = new DynamicTypeMapper({ context: this });
diff --git a/generators/go-v2/dynamic-snippets/src/context/DynamicTypeMapper.ts b/generators/go-v2/dynamic-snippets/src/context/DynamicTypeMapper.ts
index 910a10cc636..30917f5460a 100644
--- a/generators/go-v2/dynamic-snippets/src/context/DynamicTypeMapper.ts
+++ b/generators/go-v2/dynamic-snippets/src/context/DynamicTypeMapper.ts
@@ -2,7 +2,6 @@ import { assertNever } from "@fern-api/core-utils";
import { go } from "@fern-api/go-ast";
import { DynamicSnippetsGeneratorContext } from "./DynamicSnippetsGeneratorContext";
import { dynamic as DynamicSnippets, PrimitiveTypeV1 } from "@fern-fern/ir-sdk/api";
-import { Severity } from "./ErrorReporter";
export declare namespace DynamicTypeMapper {
interface Args {
diff --git a/generators/go-v2/dynamic-snippets/tsconfig.json b/generators/go-v2/dynamic-snippets/tsconfig.json
index dfd9523b41c..b4b10688fee 100644
--- a/generators/go-v2/dynamic-snippets/tsconfig.json
+++ b/generators/go-v2/dynamic-snippets/tsconfig.json
@@ -5,12 +5,7 @@
"references": [
{ "path": "../../../packages/commons/core-utils" },
{ "path": "../../../packages/commons/fs-utils" },
- { "path": "../../../packages/cli/generation/ir-generator" },
- { "path": "../../../packages/cli/dynamic-snippets" },
{ "path": "../../../packages/cli/fern-definition/schema" },
- { "path": "../../../packages/cli/project-loader" },
- { "path": "../../../packages/cli/task-context" },
- { "path": "../../../packages/cli/workspace-loader" },
{ "path": "../../../packages/ir-sdk" },
{ "path": "../../commons" },
{ "path": "../ast" },
diff --git a/generators/go/README.md b/generators/go/README.md
index 87dddc17e5a..cf640eaa556 100644
--- a/generators/go/README.md
+++ b/generators/go/README.md
@@ -1,7 +1,7 @@
-
+
diff --git a/generators/openapi/README.md b/generators/openapi/README.md
index ae01324eadb..16f05fbd297 100644
--- a/generators/openapi/README.md
+++ b/generators/openapi/README.md
@@ -1,7 +1,7 @@
-
+
diff --git a/generators/postman/README.md b/generators/postman/README.md
index 139e1ab4256..8caafa67bb8 100644
--- a/generators/postman/README.md
+++ b/generators/postman/README.md
@@ -1,7 +1,7 @@
-
+
diff --git a/generators/python/README.md b/generators/python/README.md
index 7b669ffa8de..1316f7ab4c1 100644
--- a/generators/python/README.md
+++ b/generators/python/README.md
@@ -1,7 +1,7 @@
-
+
diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/endpoint/convertParameters.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/endpoint/convertParameters.ts
index b2a18deb15a..b0803ca4e08 100644
--- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/endpoint/convertParameters.ts
+++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/endpoint/convertParameters.ts
@@ -63,7 +63,7 @@ export function convertParameters({
const availability = convertAvailability(resolvedParameter);
const parameterBreadcrumbs = [...requestBreadcrumbs, resolvedParameter.name];
- const generatedName = getGeneratedTypeName(parameterBreadcrumbs);
+ const generatedName = getGeneratedTypeName(parameterBreadcrumbs, context.options.preserveSchemaIds);
let schema =
resolvedParameter.schema != null
diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertAsyncSyncOperation.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertAsyncSyncOperation.ts
index 460573cd163..0701018e7fe 100644
--- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertAsyncSyncOperation.ts
+++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertAsyncSyncOperation.ts
@@ -69,7 +69,7 @@ export function convertAsyncSyncOperation({
name: headerToIgnore,
schema: SchemaWithExample.literal({
nameOverride: undefined,
- generatedName: getGeneratedTypeName([headerToIgnore]),
+ generatedName: getGeneratedTypeName([headerToIgnore], context.options.preserveSchemaIds),
title: undefined,
description: undefined,
availability: undefined,
diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertHttpOperation.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertHttpOperation.ts
index c69febdce1d..c01c372bf7a 100644
--- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertHttpOperation.ts
+++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertHttpOperation.ts
@@ -121,7 +121,7 @@ export function convertHttpOperation({
queryParameters: convertedParameters.queryParameters,
headers: convertedParameters.headers,
requestNameOverride: requestNameOverride ?? undefined,
- generatedRequestName: getGeneratedTypeName(requestBreadcrumbs),
+ generatedRequestName: getGeneratedTypeName(requestBreadcrumbs, context.options.preserveSchemaIds),
request: convertedRequest,
response: convertedResponse.value,
errors: convertedResponse.errors,
diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertWebhookOperation.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertWebhookOperation.ts
index ee5f1a984b8..13968c1df3d 100644
--- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertWebhookOperation.ts
+++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertWebhookOperation.ts
@@ -64,7 +64,7 @@ export function convertWebhookOperation({
operationId: operation.operationId,
tags: context.resolveTagsToTagIds(operation.tags),
headers: convertedParameters.headers,
- generatedPayloadName: getGeneratedTypeName(payloadBreadcrumbs),
+ generatedPayloadName: getGeneratedTypeName(payloadBreadcrumbs, context.options.preserveSchemaIds),
payload: convertedPayload.schema,
description: operation.description,
examples: convertWebhookExamples(convertedPayload.fullExamples),
diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/extensions/getVariableDefinitions.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/extensions/getVariableDefinitions.ts
index 8a3d27de161..e6de1fe8d5a 100644
--- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/extensions/getVariableDefinitions.ts
+++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/extensions/getVariableDefinitions.ts
@@ -5,7 +5,10 @@ import { getDefaultAsString } from "../../../schema/defaults/getDefault";
import { getGeneratedTypeName } from "../../../schema/utils/getSchemaName";
import { FernOpenAPIExtension } from "./fernExtensions";
-export function getVariableDefinitions(document: OpenAPIV3.Document): Record
{
+export function getVariableDefinitions(
+ document: OpenAPIV3.Document,
+ preserveSchemaIds: boolean
+): Record {
const variables = getExtension>(
document,
FernOpenAPIExtension.SDK_VARIABLES
@@ -22,7 +25,7 @@ export function getVariableDefinitions(document: OpenAPIV3.Document): Record(schema, FernOpenAPIExtension.TYPE_NAME);
- const generatedName = getGeneratedTypeName(breadcrumbs);
+ const generatedName = getGeneratedTypeName(breadcrumbs, preserveSchemaIds);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const description = (schema as any).description;
const availability = convertAvailability(schema);
diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertUndiscriminatedOneOf.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertUndiscriminatedOneOf.ts
index eb99f23f498..34aabed2039 100644
--- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertUndiscriminatedOneOf.ts
+++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertUndiscriminatedOneOf.ts
@@ -66,7 +66,7 @@ export function convertUndiscriminatedOneOf({
return schema.enum.map((enumValue) => {
return SchemaWithExample.literal({
nameOverride: undefined,
- generatedName: getGeneratedTypeName([generatedName, enumValue]),
+ generatedName: getGeneratedTypeName([generatedName, enumValue], context.options.preserveSchemaIds),
title: undefined,
value: LiteralSchemaValue.string(enumValue),
groupName: undefined,
@@ -201,7 +201,10 @@ export function convertUndiscriminatedOneOfWithDiscriminant({
subtypeReference.properties = {
[discriminator.propertyName]: SchemaWithExample.literal({
nameOverride: undefined,
- generatedName: getGeneratedTypeName([generatedName, discriminantValue]),
+ generatedName: getGeneratedTypeName(
+ [generatedName, discriminantValue],
+ context.options.preserveSchemaIds
+ ),
title: undefined,
value: LiteralSchemaValue.string(discriminantValue),
groupName: undefined,
diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/getSchemaName.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/getSchemaName.ts
index b854ffaa1db..d8cd9a88d84 100644
--- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/getSchemaName.ts
+++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/getSchemaName.ts
@@ -1,9 +1,17 @@
import { camelCase, upperFirst } from "lodash-es";
import { replaceStartingNumber } from "./replaceStartingNumber";
-export function getGeneratedTypeName(breadcrumbs: string[]): string {
- const underscoreDelimeted = breadcrumbs.join("_");
- const name = upperFirst(camelCase(underscoreDelimeted));
+export function getGeneratedTypeName(breadcrumbs: string[], useOriginalSchemaIds: boolean): string {
+ const processedTokens = breadcrumbs.map((token) => {
+ if (/^[^a-zA-Z0-9]+$/.test(token)) {
+ return token;
+ } else {
+ return upperFirst(camelCase(token));
+ }
+ });
+
+ const name = processedTokens.join("");
+
if (/^\d/.test(name)) {
return replaceStartingNumber(name) ?? name;
}
@@ -11,6 +19,6 @@ export function getGeneratedTypeName(breadcrumbs: string[]): string {
}
export function getGeneratedPropertyName(breadcrumbs: string[]): string {
- const underscoreDelimeted = breadcrumbs.join("_");
- return camelCase(underscoreDelimeted);
+ const underscoreDelimited = breadcrumbs.join("_");
+ return camelCase(underscoreDelimited);
}
diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/ntropy.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/ntropy.json
new file mode 100644
index 00000000000..da9a04af27f
--- /dev/null
+++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/ntropy.json
@@ -0,0 +1,10921 @@
+{
+ "absoluteFilePath": "/DUMMY_PATH",
+ "importedDefinitions": {},
+ "namedDefinitionFiles": {
+ "__package__.yml": {
+ "absoluteFilepath": "/DUMMY_PATH",
+ "contents": {
+ "errors": {
+ "CreateAccountHolderV3AccountHoldersPostRequestBadRequestError": {
+ "docs": "Account holder with the provided id already exists.",
+ "status-code": 400,
+ "type": "unknown",
+ },
+ "CreateAccountHolderV3AccountHoldersPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "CustomCategoriesPostV3CategoriesAccountHolderTypePostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "DeleteAccountHolderV3AccountHoldersIdDeleteRequestNotFoundError": {
+ "docs": "Account holder with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "DeleteAccountHolderV3AccountHoldersIdDeleteRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "DeleteBankStatementV3BankStatementsIdDeleteRequestNotFoundError": {
+ "docs": "Bank statement with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "DeleteBankStatementV3BankStatementsIdDeleteRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "DeleteCustomCategorySetV3CategoriesAccountHolderTypeResetPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "DeleteReportV3ReportsIdDeleteRequestNotFoundError": {
+ "docs": "Report with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "DeleteReportV3ReportsIdDeleteRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "DeleteTransactionV3TransactionsIdDeleteRequestNotFoundError": {
+ "docs": "Transaction with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "DeleteTransactionV3TransactionsIdDeleteRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "DeleteWebhookV3WebhooksIdDeleteRequestNotFoundError": {
+ "docs": "Webhook with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "DeleteWebhookV3WebhooksIdDeleteRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "FilterAppendV3RulesAppendPostRequestBadRequestError": {
+ "docs": "Provided rule has invalid structure",
+ "status-code": 400,
+ "type": "unknown",
+ },
+ "FilterAppendV3RulesAppendPostRequestContentTooLargeError": {
+ "docs": "Ruleset after append was larger than 50KiB",
+ "status-code": 413,
+ "type": "unknown",
+ },
+ "FilterAppendV3RulesAppendPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "FilterDeleteV3RulesIndexDeleteRequestBadRequestError": {
+ "docs": "Provided index does not exist in ruleset",
+ "status-code": 400,
+ "type": "unknown",
+ },
+ "FilterDeleteV3RulesIndexDeleteRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "FilterGetV3RulesGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "FilterPatchV3RulesIndexPatchRequestBadRequestError": {
+ "docs": "Provided index does not exist in ruleset",
+ "status-code": 400,
+ "type": "unknown",
+ },
+ "FilterPatchV3RulesIndexPatchRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "FilterPostV3RulesPostRequestBadRequestError": {
+ "docs": "Provided ruleset has invalid structure",
+ "status-code": 400,
+ "type": "unknown",
+ },
+ "FilterPostV3RulesPostRequestContentTooLargeError": {
+ "docs": "Ruleset was larger than 50KiB",
+ "status-code": 413,
+ "type": "unknown",
+ },
+ "FilterPostV3RulesPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetAccountHolderRecurringPaymentsV3AccountHoldersIdRecurringGroupsPostRequestNotFoundError": {
+ "docs": "Account holder with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetAccountHolderRecurringPaymentsV3AccountHoldersIdRecurringGroupsPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetAccountHolderV3AccountHoldersIdGetRequestNotFoundError": {
+ "docs": "Account holder with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetAccountHolderV3AccountHoldersIdGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetAccountHoldersV3AccountHoldersGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetBankStatementResultV3BankStatementsIdResultsGetRequestNotFoundError": {
+ "docs": "Bank statement with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetBankStatementResultV3BankStatementsIdResultsGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetBankStatementStatementInfoV3BankStatementsIdOverviewPostRequestNotFoundError": {
+ "docs": "Bank statement with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetBankStatementStatementInfoV3BankStatementsIdOverviewPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetBankStatementV3BankStatementsIdGetRequestNotFoundError": {
+ "docs": "Bank statement with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetBankStatementV3BankStatementsIdGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetBankStatementsV3BankStatementsGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetBatchResultsV3BatchesIdResultsGetRequestNotFoundError": {
+ "docs": "Batch with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetBatchResultsV3BatchesIdResultsGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetBatchesV3BatchesGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetCategorySetV3CategoriesAccountHolderTypeGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetEntityByIdV3EntitiesIdGetRequestBadRequestError": {
+ "docs": "Bad request.",
+ "status-code": 400,
+ "type": "unknown",
+ },
+ "GetEntityByIdV3EntitiesIdGetRequestNotFoundError": {
+ "docs": "Entity does not exist for ID",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetEntityByIdV3EntitiesIdGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetReportV3ReportsIdGetRequestNotFoundError": {
+ "docs": "Report with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetReportV3ReportsIdGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetReportsV3ReportsGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetSingleBatchV3BatchesIdGetRequestNotFoundError": {
+ "docs": "Batch with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetSingleBatchV3BatchesIdGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetTransactionV3TransactionsIdGetRequestNotFoundError": {
+ "docs": "Transaction with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "GetTransactionV3TransactionsIdGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetWebhookV3WebhooksIdGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "GetWebhooksV3WebhooksGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "ListTransactionsV3TransactionsGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "PatchWebhookV3WebhooksIdPatchRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "PostBankStatementV3BankStatementsPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "PostBatchV3BatchesPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "PostReportV3ReportsPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "PostTransactionsV3TransactionsPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "PostWebhookV3WebhooksPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "SearchEntityV3EntitiesLookupGetRequestBadRequestError": {
+ "docs": "Bad request.",
+ "status-code": 400,
+ "type": "unknown",
+ },
+ "SearchEntityV3EntitiesLookupGetRequestLockedError": {
+ "docs": "Not enough credits.",
+ "status-code": 423,
+ "type": "unknown",
+ },
+ "SearchEntityV3EntitiesLookupGetRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ "SetTransactionAhV3TransactionsIdAssignPostRequestNotFoundError": {
+ "docs": "Transaction or account holder with the provided id not found.",
+ "status-code": 404,
+ "type": "unknown",
+ },
+ "SetTransactionAhV3TransactionsIdAssignPostRequestUnprocessableEntityError": {
+ "docs": "Validation Error",
+ "examples": [
+ {
+ "docs": undefined,
+ "name": undefined,
+ "value": {},
+ },
+ ],
+ "status-code": 422,
+ "type": "HTTPValidationError",
+ },
+ },
+ "types": {
+ "Account": {
+ "docs": undefined,
+ "properties": {
+ "closing_balance": {
+ "type": "optional",
+ },
+ "iso_currency_code": {
+ "type": "optional",
+ },
+ "number": {
+ "type": "optional",
+ },
+ "opening_balance": {
+ "type": "optional",
+ },
+ "type": {
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "AccountHolder": {
+ "docs": undefined,
+ "properties": {
+ "address": {
+ "type": "optional",
+ },
+ "name": {
+ "type": "optional",
+ },
+ "type": {
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "AccountHolderExternal": {
+ "docs": undefined,
+ "properties": {
+ "created_at": {
+ "docs": "The timestamp of when the account holder was created.",
+ "type": "datetime",
+ },
+ "id": {
+ "docs": "The unique ID of the account holder of the transaction",
+ "type": "string",
+ "validation": {
+ "format": undefined,
+ "maxLength": undefined,
+ "minLength": 1,
+ "pattern": undefined,
+ },
+ },
+ "name": {
+ "docs": "The name of the account holder",
+ "type": "optional",
+ },
+ "type": {
+ "docs": "The type of the account holder. ",
+ "type": "AccountHolderType",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "AccountHolderType": {
+ "docs": "An enumeration.",
+ "enum": [
+ "consumer",
+ "business",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "AccountType": {
+ "docs": "An enumeration.",
+ "enum": [
+ "consumer",
+ "business",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "AccountingCategory": {
+ "docs": "An enumeration.",
+ "enum": [
+ {
+ "name": "OperationalExpenses",
+ "value": "operational expenses",
+ },
+ {
+ "name": "CostOfGoodsSold",
+ "value": "cost of goods sold",
+ },
+ "revenue",
+ "financing",
+ "taxes",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "ActionModel": {
+ "type": "action",
+ },
+ "Address": {
+ "docs": undefined,
+ "properties": {
+ "city": {
+ "type": "optional",
+ },
+ "country": {
+ "type": "optional",
+ },
+ "postcode": {
+ "type": "optional",
+ },
+ "state": {
+ "type": "optional",
+ },
+ "street": {
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BankStatement": {
+ "docs": "Represents a bank statement with details about the file and its status.",
+ "properties": {
+ "created_at": {
+ "docs": "The date and time when the job was created.",
+ "type": "datetime",
+ },
+ "error": {
+ "type": "optional",
+ },
+ "file": {
+ "docs": "Information about the bank statement file being processed.",
+ "type": "BankStatementFile",
+ },
+ "id": {
+ "docs": "A unique identifier for the bank statement job.",
+ "type": "string",
+ },
+ "name": {
+ "docs": "The name of the bank statement file, if available.",
+ "type": "optional",
+ },
+ "status": {
+ "docs": "The current status of the document.",
+ "type": "BankStatementStatus",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BankStatementAccount": {
+ "docs": undefined,
+ "properties": {
+ "closing_balance": {
+ "docs": "The closing balance of the account for the statement period.",
+ "type": "optional",
+ },
+ "end_date": {
+ "docs": "The end date of the statement period.",
+ "type": "optional",
+ "validation": {
+ "format": "date",
+ "maxLength": undefined,
+ "minLength": undefined,
+ "pattern": undefined,
+ },
+ },
+ "is_balance_reconciled": {
+ "docs": "Indicates whether the balance has been reconciled.",
+ "type": "optional",
+ },
+ "number": {
+ "docs": "The account number, if available.",
+ "type": "optional",
+ },
+ "opening_balance": {
+ "docs": "The opening balance of the account for the statement period.",
+ "type": "optional",
+ },
+ "start_date": {
+ "docs": "The start date of the statement period.",
+ "type": "optional",
+ "validation": {
+ "format": "date",
+ "maxLength": undefined,
+ "minLength": undefined,
+ "pattern": undefined,
+ },
+ },
+ "total_incoming": {
+ "docs": "The sum of amounts of all incoming transactions.",
+ "type": "optional",
+ },
+ "total_outgoing": {
+ "docs": "The sum of amounts of all outgoing transactions.",
+ "type": "optional",
+ },
+ "transactions": {
+ "docs": "List of transactions for this account.",
+ "type": "list",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BankStatementError": {
+ "docs": undefined,
+ "properties": {
+ "code": {
+ "type": "BankStatementErrorCode",
+ },
+ "message": "string",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BankStatementErrorCode": {
+ "docs": "An enumeration.",
+ "enum": [
+ "invalid_bank_statement",
+ "internal_error",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BankStatementFile": {
+ "docs": undefined,
+ "properties": {
+ "no_pages": {
+ "docs": "The number of pages in the bank statement file.",
+ "type": "integer",
+ },
+ "size": {
+ "docs": "The size of the bank statement file in bytes, if available.",
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BankStatementResults": {
+ "docs": undefined,
+ "properties": {
+ "accounts": {
+ "docs": "List of accounts in the bank statement.",
+ "type": "list",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BankStatementStatus": {
+ "docs": "An enumeration.",
+ "enum": [
+ "processing",
+ "completed",
+ "error",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BankStatementTransaction": {
+ "docs": undefined,
+ "properties": {
+ "amount": {
+ "docs": "The amount of the transaction in the `currency`. Must be a positive value. For example, if the `currency` is USD, then it's the amount in dollars.",
+ "type": "double",
+ "validation": {
+ "exclusiveMax": undefined,
+ "exclusiveMin": undefined,
+ "max": undefined,
+ "min": 0,
+ "multipleOf": undefined,
+ },
+ },
+ "currency": {
+ "docs": "The currency of the transaction in ISO 4217 format",
+ "type": "Currency",
+ },
+ "date": {
+ "docs": "The date that the transaction was posted. Uses ISO 8601 format (YYYY-MM-DD)",
+ "type": "string",
+ "validation": {
+ "format": "date",
+ "maxLength": undefined,
+ "minLength": undefined,
+ "pattern": undefined,
+ },
+ },
+ "description": {
+ "docs": "The description string of the transaction",
+ "type": "string",
+ "validation": {
+ "format": undefined,
+ "maxLength": 1024,
+ "minLength": 0,
+ "pattern": undefined,
+ },
+ },
+ "entry_type": {
+ "docs": "The direction of the flow of the money from the perspective of the account holder. `outgoing` to represent money leaving the account, such as purchases or fees, while `incoming` represents money entering the account, such as income or refunds.",
+ "type": "EntryType",
+ },
+ "id": {
+ "docs": "A unique identifier of the transaction",
+ "type": "string",
+ "validation": {
+ "format": undefined,
+ "maxLength": undefined,
+ "minLength": 1,
+ "pattern": undefined,
+ },
+ },
+ "running_balance": {
+ "docs": "The account's balance when this transaction was performed",
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Batch": {
+ "docs": "The `Batch` object represents the status and progress of an asynchronous batch enrichment job.",
+ "properties": {
+ "created_at": {
+ "docs": "The timestamp of when the batch was created.",
+ "type": "datetime",
+ },
+ "id": {
+ "docs": "A unique identifier for the batch.",
+ "type": "string",
+ },
+ "progress": {
+ "docs": "The number of transactions processed so far.",
+ "type": "integer",
+ },
+ "status": {
+ "docs": "The current status of the batch. A batch will error if at least one of the transactions contains an error.",
+ "type": "BatchStatus",
+ },
+ "total": {
+ "docs": "The total number of transactions in the batch.",
+ "type": "integer",
+ },
+ "updated_at": {
+ "docs": "The timestamp of when the batch was last updated.",
+ "type": "datetime",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BatchResult": {
+ "docs": "The `BatchResult` object represents the result of a batch enrichment job, including its status and
+enriched transactions.",
+ "properties": {
+ "id": {
+ "docs": "A unique identifier for the batch.",
+ "type": "string",
+ },
+ "results": {
+ "type": "EnrichmentResult",
+ },
+ "status": {
+ "docs": "The current status of the batch job.",
+ "type": "BatchStatus",
+ },
+ "total": {
+ "docs": "The total number of transactions in the batch result.",
+ "type": "integer",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "BatchStatus": {
+ "docs": "An enumeration.",
+ "enum": [
+ "processing",
+ "completed",
+ "error",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Categories": {
+ "docs": undefined,
+ "properties": {
+ "accounting": {
+ "docs": "The corresponding accounting category. Only available for `business` transactions.",
+ "type": "optional",
+ },
+ "general": {
+ "docs": "The category of the transaction. View the valid set of categories for your key [here](./docs/v3/enrichment/entities).",
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "CategoryConfidence": {
+ "docs": "An enumeration.",
+ "enum": [
+ "high",
+ "medium",
+ "low",
+ "unknown",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "CategorySet": {
+ "docs": undefined,
+ "properties": {
+ "incoming": {
+ "type": "list",
+ },
+ "outgoing": {
+ "type": "list",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Counterparty": {
+ "docs": undefined,
+ "properties": {
+ "id": {
+ "docs": "The unique UUID identifier of the entity",
+ "type": "optional",
+ },
+ "logo": {
+ "docs": "Logo's URL",
+ "type": "optional",
+ },
+ "mccs": {
+ "docs": "A list of [Merchant Category Codes](https://en.wikipedia.org/wiki/Merchant_category_code)",
+ "type": "optional>",
+ },
+ "name": {
+ "docs": "The name of the entity",
+ "type": "optional",
+ },
+ "type": {
+ "type": "CounterpartyType",
+ },
+ "website": {
+ "docs": "The website URL of the entity",
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "CounterpartyType": {
+ "docs": "An enumeration.",
+ "enum": [
+ "person",
+ "organization",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Country": {
+ "docs": "An enumeration.",
+ "enum": [
+ "AD",
+ "AE",
+ "AF",
+ "AG",
+ "AI",
+ "AL",
+ "AM",
+ "AO",
+ "AR",
+ "AS",
+ "AT",
+ "AU",
+ "AW",
+ "AZ",
+ "BA",
+ "BB",
+ "BD",
+ "BE",
+ "BF",
+ "BG",
+ "BH",
+ "BI",
+ "BJ",
+ "BL",
+ "BM",
+ "BN",
+ "BO",
+ "BQ",
+ "BR",
+ "BS",
+ "BT",
+ "BV",
+ "BW",
+ "BY",
+ "BZ",
+ "CA",
+ "CC",
+ "CD",
+ "CF",
+ "CG",
+ "CH",
+ "CI",
+ "CK",
+ "CL",
+ "CM",
+ "CN",
+ "CO",
+ "CR",
+ "CU",
+ "CV",
+ "CW",
+ "CX",
+ "CY",
+ "CZ",
+ "DE",
+ "DJ",
+ "DK",
+ "DM",
+ "DO",
+ "DZ",
+ "EC",
+ "EE",
+ "EG",
+ "EH",
+ "ER",
+ "ES",
+ "ET",
+ "FI",
+ "FJ",
+ "FK",
+ "FM",
+ "FR",
+ "GA",
+ "GB",
+ "GD",
+ "GE",
+ "GF",
+ "GG",
+ "GH",
+ "GI",
+ "GL",
+ "GM",
+ "GN",
+ "GP",
+ "GQ",
+ "GR",
+ "GS",
+ "GT",
+ "GU",
+ "GW",
+ "GY",
+ "HK",
+ "HM",
+ "HN",
+ "HR",
+ "HT",
+ "HU",
+ "ID",
+ "IE",
+ "IL",
+ "IM",
+ "IN",
+ "IO",
+ "IQ",
+ "IR",
+ "IS",
+ "IT",
+ "JE",
+ "JM",
+ "JO",
+ "JP",
+ "KE",
+ "KG",
+ "KH",
+ "KI",
+ "KM",
+ "KN",
+ "KP",
+ "KR",
+ "KW",
+ "KY",
+ "KZ",
+ "LA",
+ "LB",
+ "LC",
+ "LI",
+ "LK",
+ "LR",
+ "LS",
+ "LT",
+ "LU",
+ "LV",
+ "LY",
+ "MA",
+ "MC",
+ "MD",
+ "ME",
+ "MF",
+ "MG",
+ "MH",
+ "MK",
+ "ML",
+ "MM",
+ "MN",
+ "MO",
+ "MP",
+ "MQ",
+ "MR",
+ "MS",
+ "MT",
+ "MU",
+ "MV",
+ "MW",
+ "MX",
+ "MY",
+ "MZ",
+ "NA",
+ "NC",
+ "NE",
+ "NF",
+ "NG",
+ "NI",
+ "NL",
+ "NO",
+ "NP",
+ "NR",
+ "NU",
+ "NZ",
+ "OM",
+ "PA",
+ "PE",
+ "PF",
+ "PG",
+ "PH",
+ "PK",
+ "PL",
+ "PM",
+ "PN",
+ "PR",
+ "PS",
+ "PT",
+ "PW",
+ "PY",
+ "QA",
+ "RE",
+ "RO",
+ "RS",
+ "RU",
+ "RW",
+ "SA",
+ "SB",
+ "SC",
+ "SD",
+ "SE",
+ "SG",
+ "SH",
+ "SI",
+ "SJ",
+ "SK",
+ "SL",
+ "SM",
+ "SN",
+ "SO",
+ "SR",
+ "SS",
+ "ST",
+ "SV",
+ "SX",
+ "SY",
+ "SZ",
+ "TC",
+ "TD",
+ "TG",
+ "TH",
+ "TJ",
+ "TK",
+ "TL",
+ "TM",
+ "TN",
+ "TO",
+ "TR",
+ "TT",
+ "TV",
+ "TW",
+ "TZ",
+ "UA",
+ "UG",
+ "UM",
+ "US",
+ "UY",
+ "UZ",
+ "VC",
+ "VE",
+ "VG",
+ "VI",
+ "VN",
+ "VU",
+ "WF",
+ "WS",
+ "YE",
+ "YT",
+ "ZA",
+ "ZM",
+ "ZW",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Currency": {
+ "docs": "An enumeration.",
+ "enum": [
+ "EUR",
+ "AED",
+ "AFN",
+ "XCD",
+ "ALL",
+ "AMD",
+ "AOA",
+ "ARS",
+ "USD",
+ "AUD",
+ "AWG",
+ "AZN",
+ "BAM",
+ "BBD",
+ "BDT",
+ "XOF",
+ "BGN",
+ "BHD",
+ "BIF",
+ "BMD",
+ "BND",
+ "BOB",
+ "BRL",
+ "BSD",
+ "INR",
+ "NOK",
+ "BWP",
+ "BYR",
+ "BZD",
+ "CAD",
+ "CDF",
+ "XAF",
+ "CHF",
+ "NZD",
+ "CLP",
+ "CNY",
+ "COP",
+ "CRC",
+ "CUP",
+ "CVE",
+ "ANG",
+ "CZK",
+ "DJF",
+ "DKK",
+ "DOP",
+ "DZD",
+ "EGP",
+ "MAD",
+ "ERN",
+ "ETB",
+ "FJD",
+ "FKP",
+ "GBP",
+ "GEL",
+ "GHS",
+ "GIP",
+ "GMD",
+ "GNF",
+ "GTQ",
+ "GYD",
+ "HKD",
+ "HNL",
+ "HUF",
+ "IDR",
+ "ILS",
+ "IQD",
+ "IRR",
+ "ISK",
+ "JMD",
+ "JOD",
+ "JPY",
+ "KES",
+ "KGS",
+ "KHR",
+ "KMF",
+ "KPW",
+ "KRW",
+ "KWD",
+ "KYD",
+ "KZT",
+ "LAK",
+ "LBP",
+ "LKR",
+ "LRD",
+ "ZAR",
+ "LYD",
+ "MDL",
+ "MGA",
+ "MKD",
+ "MMK",
+ "MNT",
+ "MOP",
+ "MRO",
+ "MUR",
+ "MVR",
+ "MWK",
+ "MXN",
+ "MYR",
+ "MZN",
+ "XPF",
+ "NGN",
+ "NIO",
+ "NPR",
+ "OMR",
+ "PEN",
+ "PGK",
+ "PHP",
+ "PKR",
+ "PLN",
+ "PYG",
+ "QAR",
+ "RON",
+ "RSD",
+ "RUB",
+ "RWF",
+ "SAR",
+ "SBD",
+ "SCR",
+ "SDG",
+ "SEK",
+ "SGD",
+ "SHP",
+ "SLL",
+ "SOS",
+ "SRD",
+ "SSP",
+ "STD",
+ "SYP",
+ "SZL",
+ "THB",
+ "TJS",
+ "TMT",
+ "TND",
+ "TOP",
+ "TRY",
+ "TTD",
+ "TWD",
+ "TZS",
+ "UAH",
+ "UGX",
+ "UYU",
+ "UZS",
+ "VEF",
+ "VND",
+ "VUV",
+ "WST",
+ "YER",
+ "ZMW",
+ "ZWL",
+ "HRK",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "CustomCategorySet": {
+ "docs": undefined,
+ "properties": {
+ "incoming": {
+ "type": "list",
+ },
+ "outgoing": {
+ "type": "list",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "DocumentStatus": {
+ "docs": "An enumeration.",
+ "enum": [
+ "queued",
+ "processing",
+ "processed",
+ "failed",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "EditableTxProp": {
+ "enum": [
+ "logo",
+ "website",
+ "merchant",
+ "merchant_id",
+ "location",
+ "person",
+ "transaction_type",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "EnrichedTransaction": {
+ "docs": undefined,
+ "properties": {
+ "categories": {
+ "type": "optional",
+ },
+ "created_at": {
+ "docs": "The timestamp of when the account holder was created.",
+ "type": "datetime",
+ },
+ "entities": {
+ "type": "optional",
+ },
+ "error": {
+ "type": "optional",
+ },
+ "id": {
+ "docs": "A unique identifier for the transaction. If two transactions are submitted with the same `id` the most recent one will replace the previous one.",
+ "type": "string",
+ "validation": {
+ "format": undefined,
+ "maxLength": undefined,
+ "minLength": 1,
+ "pattern": undefined,
+ },
+ },
+ "location": {
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "EnrichmentResult": {
+ "docs": undefined,
+ "properties": {
+ "transactions": {
+ "docs": "A list of enriched transactions resulting from the enrichment of this batch.",
+ "type": "list",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Entities": {
+ "docs": "Entities found by identity identification",
+ "properties": {
+ "counterparty": {
+ "type": "optional",
+ },
+ "intermediaries": {
+ "type": "optional>",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Entity": {
+ "docs": undefined,
+ "properties": {
+ "id": {
+ "docs": "The unique UUID identifier of the entity",
+ "type": "optional",
+ },
+ "logo": {
+ "docs": "Logo's URL",
+ "type": "optional",
+ },
+ "mccs": {
+ "docs": "A list of [Merchant Category Codes](https://en.wikipedia.org/wiki/Merchant_category_code)",
+ "type": "optional>",
+ },
+ "name": {
+ "docs": "The name of the entity",
+ "type": "optional",
+ },
+ "website": {
+ "docs": "The website URL of the entity",
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "EntryType": {
+ "docs": "An enumeration.",
+ "enum": [
+ "incoming",
+ "outgoing",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Filter": {
+ "type": "list",
+ },
+ "FilterModel": {
+ "type": "Filter",
+ },
+ "FnCall": {
+ "discriminated": false,
+ "docs": undefined,
+ "encoding": undefined,
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ "union": [
+ {
+ "type": "FnCall&&",
+ },
+ {
+ "type": "FnCall||",
+ },
+ {
+ "type": "FnCall==",
+ },
+ {
+ "type": "FnCall+",
+ },
+ {
+ "type": "FnCall-",
+ },
+ {
+ "type": "FnCall*",
+ },
+ {
+ "type": "FnCall/",
+ },
+ {
+ "type": "FnCall//",
+ },
+ {
+ "type": "FnCall<",
+ },
+ {
+ "type": "FnCall<=",
+ },
+ {
+ "type": "FnCall>",
+ },
+ {
+ "type": "FnCall>=",
+ },
+ {
+ "type": "FnCall!",
+ },
+ {
+ "type": "FnCallIsSubstring",
+ },
+ {
+ "type": "FnCallStartsWith",
+ },
+ {
+ "type": "FnCallEndsWith",
+ },
+ {
+ "type": "FnCallToLower",
+ },
+ {
+ "type": "FnCallToUpper",
+ },
+ {
+ "type": "FnCallHasLabel",
+ },
+ {
+ "type": "FnCallHasMcc",
+ },
+ {
+ "type": "FnCallGet",
+ },
+ ],
+ },
+ "FnCall!": {
+ "docs": undefined,
+ "properties": {
+ "!": {
+ "type": "expression",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall&&": {
+ "docs": undefined,
+ "properties": {
+ "&&": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall*": {
+ "docs": undefined,
+ "properties": {
+ "*": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall+": {
+ "docs": undefined,
+ "properties": {
+ "+": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall-": {
+ "docs": undefined,
+ "properties": {
+ "-": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall/": {
+ "docs": undefined,
+ "properties": {
+ "/": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall//": {
+ "docs": undefined,
+ "properties": {
+ "//": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall<": {
+ "docs": undefined,
+ "properties": {
+ "<": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall<=": {
+ "docs": undefined,
+ "properties": {
+ "<=": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall==": {
+ "docs": undefined,
+ "properties": {
+ "==": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall>": {
+ "docs": undefined,
+ "properties": {
+ ">": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall>=": {
+ "docs": undefined,
+ "properties": {
+ ">=": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCallEndsWith": {
+ "docs": undefined,
+ "properties": {
+ "ends_with": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCallGet": {
+ "docs": undefined,
+ "properties": {
+ "get": {
+ "type": "properties",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCallHasLabel": {
+ "docs": undefined,
+ "properties": {
+ "has_label": {
+ "type": "expression",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCallHasMcc": {
+ "docs": undefined,
+ "properties": {
+ "has_mcc": {
+ "type": "expression",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCallIsSubstring": {
+ "docs": undefined,
+ "properties": {
+ "is_substring": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCallStartsWith": {
+ "docs": undefined,
+ "properties": {
+ "starts_with": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCallToLower": {
+ "docs": undefined,
+ "properties": {
+ "to_lower": {
+ "type": "expression",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCallToUpper": {
+ "docs": undefined,
+ "properties": {
+ "to_upper": {
+ "type": "expression",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "FnCall||": {
+ "docs": undefined,
+ "properties": {
+ "||": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "HTTPValidationError": {
+ "docs": undefined,
+ "properties": {
+ "detail": {
+ "type": "optional>",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Intermediary": {
+ "docs": undefined,
+ "properties": {
+ "id": {
+ "docs": "The unique UUID identifier of the entity",
+ "type": "optional",
+ },
+ "logo": {
+ "docs": "Logo's URL",
+ "type": "optional",
+ },
+ "mccs": {
+ "docs": "A list of [Merchant Category Codes](https://en.wikipedia.org/wiki/Merchant_category_code)",
+ "type": "optional>",
+ },
+ "name": {
+ "docs": "The name of the entity",
+ "type": "optional",
+ },
+ "type": {
+ "type": "IntermediaryType",
+ },
+ "website": {
+ "docs": "The website URL of the entity",
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "IntermediaryType": {
+ "docs": "An enumeration.",
+ "enum": [
+ "delivery_service",
+ "payment_processor",
+ ],
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "Location": {
+ "docs": undefined,
+ "properties": {
+ "raw_address": {
+ "docs": "An unstructured string containing the address",
+ "type": "optional",
+ },
+ "structured": {
+ "docs": "When raw is set, a structured representation of it.",
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "LocationInput": {
+ "docs": "Location of where the transaction has taken place. This can greatly improve entity identification, especially
+under ambiguity.",
+ "properties": {
+ "country": {
+ "docs": "The country where the transaction was made in ISO 3166-2 format",
+ "type": "Country",
+ },
+ "raw_address": {
+ "docs": "An unstructured string containing the address",
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "LocationStructured": {
+ "docs": undefined,
+ "properties": {
+ "apple_maps_url": {
+ "docs": "A URL link to view the location on Apple Maps",
+ "type": "optional",
+ },
+ "city": {
+ "docs": "The city where the location is situated",
+ "type": "optional",
+ },
+ "country": {
+ "docs": "The full name of the country",
+ "type": "optional",
+ },
+ "country_code": {
+ "docs": "The country code of the location in ISO 3166-2 format",
+ "type": "optional",
+ },
+ "google_maps_url": {
+ "docs": "A URL link to view the location on Google Maps",
+ "type": "optional",
+ },
+ "latitude": {
+ "docs": "The latitude coordinate of the location",
+ "type": "optional",
+ },
+ "longitude": {
+ "docs": "The longitude coordinate of the location",
+ "type": "optional",
+ },
+ "postcode": {
+ "docs": "The postal code or ZIP code of the location",
+ "type": "optional",
+ },
+ "state": {
+ "docs": "The state or region of the location",
+ "type": "optional",
+ },
+ "store_number": {
+ "docs": "A unique identifier for a specific store or branch, if applicable",
+ "type": "optional",
+ },
+ "street": {
+ "docs": "The street name and number of the location",
+ "type": "optional",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "ModifyLabels": {
+ "discriminated": false,
+ "docs": undefined,
+ "encoding": undefined,
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ "union": [
+ {
+ "type": "ModifyLabelsAddLabel",
+ },
+ {
+ "type": "ModifyLabelsRemoveLabel",
+ },
+ {
+ "type": "ModifyLabelsSetLabels",
+ },
+ {
+ "type": "ModifyLabelsAddMcc",
+ },
+ {
+ "type": "ModifyLabelsRemoveMcc",
+ },
+ {
+ "type": "ModifyLabelsSetMcc",
+ },
+ ],
+ },
+ "ModifyLabelsAddLabel": {
+ "docs": undefined,
+ "properties": {
+ "add_label": {
+ "type": "expression",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "ModifyLabelsAddMcc": {
+ "docs": undefined,
+ "properties": {
+ "add_mcc": {
+ "type": "expression",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "ModifyLabelsRemoveLabel": {
+ "docs": undefined,
+ "properties": {
+ "remove_label": {
+ "type": "expression",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "ModifyLabelsRemoveMcc": {
+ "docs": undefined,
+ "properties": {
+ "remove_mcc": {
+ "type": "expression",
+ },
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "ModifyLabelsSetLabels": {
+ "docs": undefined,
+ "properties": {
+ "set_labels": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "ModifyLabelsSetMcc": {
+ "docs": undefined,
+ "properties": {
+ "set_mcc": "list",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "PagedResponseAccountHolderExternal": {
+ "docs": undefined,
+ "properties": {
+ "data": {
+ "type": "list",
+ },
+ "next_cursor": "string",
+ },
+ "source": {
+ "openapi": "../openapi.yml",
+ },
+ },
+ "PagedResponseBankStatement": {
+ "docs": undefined,
+ "properties": {
+ "data": {
+ "type": "list