diff --git a/.eslintignore b/.eslintignore index 34770f59576..2d3623353c5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,4 +10,4 @@ packages/ir-sdk/** packages/seed/** generators/typescript/utils/core-utilities/** seed/** - +docker/seed/** diff --git a/.github/workflows/build-seed.yml b/.github/workflows/build-seed.yml new file mode 100644 index 00000000000..6be1af3a7d8 --- /dev/null +++ b/.github/workflows/build-seed.yml @@ -0,0 +1,74 @@ +name: Build seed containers + +on: + push: + branches: + - main + workflow_dispatch: + +# Cancel previous workflows on previous push +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + changes: + runs-on: ubuntu-latest + outputs: + packages: ${{ steps.filter.outputs.changes }} + steps: + - uses: actions/checkout@v2 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + python: + - 'docker/seed/Dockerfile.python' + - 'generators/python/poetry.lock' + - '.github/workflows/build-seed.yml' + ts: + - 'docker/seed/Dockerfile.ts' + - '.github/workflows/build-seed.yml' + java: + - 'docker/seed/Dockerfile.java' + - '.github/workflows/build-seed.yml' + build-container: + strategy: + matrix: + # Parse JSON array containing names of all filters matching any of changed files + # e.g. ['package1', 'package2'] if both package folders contains changes + package: ${{ fromJSON(needs.changes.outputs.packages) }} + runs-on: ubuntu-latest + needs: changes + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: fernapi + password: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: fernapi/${{ matrix.package }}-seed + tags: | + type=sha + latest + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: ./docker/seed/Dockerfile.${{ matrix.package }} + push: true + # use short SHA if modded, or just use latest if nothing changed + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/seed.yml b/.github/workflows/seed.yml index a6cafcb5379..fcbe3cf245a 100644 --- a/.github/workflows/seed.yml +++ b/.github/workflows/seed.yml @@ -32,6 +32,7 @@ jobs: with: filters: | seed: + - '.github/workflows/seed.yml' - 'packages/seed/**' - 'test-definitions/**' ruby: 'generators/ruby/**' @@ -56,7 +57,7 @@ jobs: - name: Install Seed env: - FORCE_COLOR: "2" + FORCE_COLOR: "2" run: npm install -g @fern-api/seed-cli - name: Yarn Install @@ -64,7 +65,7 @@ jobs: - name: Seed Test run: | - yarn seed:local test --workspace ruby-model --parallel 16 + yarn seed:local test --workspace ruby-model - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -82,7 +83,7 @@ jobs: node-version: 18 cache: "yarn" - - name: Install Seed + - name: Install Seed run: npm install -g @fern-api/seed-cli - name: Yarn Install @@ -90,9 +91,9 @@ jobs: - name: Seed Test env: - FORCE_COLOR: "2" + FORCE_COLOR: "2" run: | - yarn seed:local test --workspace ruby-sdk --parallel 16 + yarn seed:local test --workspace ruby-sdk - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -122,9 +123,9 @@ jobs: - name: Seed Test env: - FORCE_COLOR: "2" + FORCE_COLOR: "2" run: | - yarn seed:local test --workspace pydantic --parallel 16 + yarn seed:local test --workspace pydantic - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -154,9 +155,9 @@ jobs: - name: Seed Test env: - FORCE_COLOR: "2" + FORCE_COLOR: "2" run: | - yarn seed:local test --workspace python-sdk --parallel 16 + yarn seed:local test --workspace python-sdk --parallel 10 - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -186,9 +187,9 @@ jobs: - name: Seed Test env: - FORCE_COLOR: "2" + FORCE_COLOR: "2" run: | - yarn seed:local test --workspace fastapi --parallel 16 + yarn seed:local test --workspace fastapi - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -213,7 +214,7 @@ jobs: env: FORCE_COLOR: "2" run: | - yarn seed:local test --workspace openapi --parallel 16 + yarn seed:local test --workspace openapi - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -238,7 +239,7 @@ jobs: env: FORCE_COLOR: "2" run: | - yarn seed:local test --workspace postman --parallel 16 + yarn seed:local test --workspace postman - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -263,7 +264,7 @@ jobs: env: FORCE_COLOR: "2" run: | - yarn seed:local test --workspace java-sdk --parallel 16 + yarn seed:local test --workspace java-sdk --parallel 10 - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -288,7 +289,7 @@ jobs: env: FORCE_COLOR: "2" run: | - yarn seed:local test --workspace java-model --parallel 16 + yarn seed:local test --workspace java-model --parallel 10 - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -313,7 +314,7 @@ jobs: env: FORCE_COLOR: "2" run: | - yarn seed:local test --workspace java-spring --parallel 16 + yarn seed:local test --workspace java-spring - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -336,9 +337,9 @@ jobs: - name: Seed Test env: - FORCE_COLOR: "2" + FORCE_COLOR: "2" run: | - yarn seed:local test --workspace ts-sdk --parallel 16 + yarn seed:local test --workspace ts-sdk - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code @@ -363,7 +364,7 @@ jobs: env: FORCE_COLOR: "2" run: | - yarn seed:local test --workspace ts-express --parallel 16 + yarn seed:local test --workspace ts-express --parallel 1 - name: Ensure no changes to git-tracked files run: git --no-pager diff --exit-code diff --git a/docker/seed/Dockerfile.java b/docker/seed/Dockerfile.java new file mode 100644 index 00000000000..b417df13e66 --- /dev/null +++ b/docker/seed/Dockerfile.java @@ -0,0 +1,57 @@ +# Small ubuntu base image +FROM redhat/ubi9:latest + +# Install sdkman +RUN yum update -y +RUN yum -y install git zip unzip +RUN git clone https://github.com/jenv/jenv.git ~/.jenv +RUN echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile +RUN echo 'eval "$(jenv init -)"' >> ~/.bash_profile +RUN source ~/.bash_profile + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_aarch64_linux_hotspot_8u292b10.tar.gz'; \ + ;; \ + amd64|x86_64) \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u292b10.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + mkdir -p /opt/java/openjdk8; \ + cd /opt/java/openjdk8; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +RUN source ~/.bash_profile && jenv add /opt/java/openjdk8 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.9.1_1.tar.gz'; \ + ;; \ + amd64|x86_64) \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.9.1_1.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + mkdir -p /opt/java/openjdk11; \ + cd /opt/java/openjdk11; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +RUN source ~/.bash_profile && jenv add /opt/java/openjdk11 +RUN source ~/.bash_profile && jenv global 11 +RUN source ~/.bash_profile && jenv enable-plugin export +RUN source ~/.bash_profile && jenv enable-plugin gradle diff --git a/docker/seed/Dockerfile.python b/docker/seed/Dockerfile.python new file mode 100644 index 00000000000..82a829c1382 --- /dev/null +++ b/docker/seed/Dockerfile.python @@ -0,0 +1,32 @@ +# Small ubuntu base image +FROM redhat/ubi9:latest + +# Setup the environment, can run pytest, poetry install, etc. +COPY seed/python-sdk/imdb/pyproject.toml ./pyproject.toml +COPY seed/python-sdk/imdb/poetry.lock ./poetry.lock +COPY seed/python-sdk/imdb/src ./src + +# Setup pyenv +RUN yum update -y +RUN yum -y install git gcc zlib-devel openssl-devel xz-devel +RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv +ENV PYENV_ROOT="${HOME}/.pyenv" +ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}" +RUN eval "$(pyenv init --path)" + +RUN pyenv install 3.9 || true +RUN pyenv install 3.8 || true + +# Setup poetry +RUN pyenv global 3.9 +RUN pip install poetry &&\ + poetry config virtualenvs.create false &&\ + poetry install +RUN pip install mypy==1.8.0 + +# Setup poetry +RUN pyenv global 3.8 +RUN pip install poetry &&\ + poetry config virtualenvs.create false &&\ + poetry install +RUN pip install mypy==1.8.0 diff --git a/docker/seed/Dockerfile.ts b/docker/seed/Dockerfile.ts new file mode 100644 index 00000000000..1aacbcbdd15 --- /dev/null +++ b/docker/seed/Dockerfile.ts @@ -0,0 +1,4 @@ +FROM node:lts-slim + +# Installs tsc +RUN npm install -g typescript diff --git a/packages/seed/src/cli.ts b/packages/seed/src/cli.ts index 50914dc04ec..6b5825730a8 100644 --- a/packages/seed/src/cli.ts +++ b/packages/seed/src/cli.ts @@ -40,7 +40,7 @@ function addTestCommand(cli: Argv) { .option("custom-fixture", { type: "string", demandOption: false, - description: "Path to the api directory" + description: "Path to the API directory" }) .option("fixture", { type: "array", diff --git a/seed/csharp-model/alias/ir.json b/seed/csharp-model/alias/ir.json index b6aaef92bcf..2c3b07b4ad6 100644 --- a/seed/csharp-model/alias/ir.json +++ b/seed/csharp-model/alias/ir.json @@ -771,12 +771,14 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": {}, "rootPackage": { "fernFilepath": { "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:TypeId", "type_:Type", diff --git a/seed/csharp-model/api-wide-base-path/ir.json b/seed/csharp-model/api-wide-base-path/ir.json index 406443ff02b..4cf34b4aff5 100644 --- a/seed/csharp-model/api-wide-base-path/ir.json +++ b/seed/csharp-model/api-wide-base-path/ir.json @@ -348,6 +348,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -369,6 +370,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -424,6 +426,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/audiences/ir.json b/seed/csharp-model/audiences/ir.json index 6d37fb33aa7..c68ef145fd6 100644 --- a/seed/csharp-model/audiences/ir.json +++ b/seed/csharp-model/audiences/ir.json @@ -1848,6 +1848,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_commons": { "name": { @@ -1869,6 +1870,7 @@ "safeName": "Commons" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1939,6 +1941,7 @@ "safeName": "FolderA" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2010,6 +2013,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2120,6 +2124,7 @@ "safeName": "FolderB" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2191,6 +2196,7 @@ "safeName": "Common" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2300,6 +2306,7 @@ "safeName": "FolderC" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2371,6 +2378,7 @@ "safeName": "Common" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2480,6 +2488,7 @@ "safeName": "Foo" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2539,6 +2548,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/auth-environment-variables/ir.json b/seed/csharp-model/auth-environment-variables/ir.json index 1c991c67e90..fe90e23b12c 100644 --- a/seed/csharp-model/auth-environment-variables/ir.json +++ b/seed/csharp-model/auth-environment-variables/ir.json @@ -198,6 +198,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -219,6 +220,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -274,6 +276,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/basic-auth/ir.json b/seed/csharp-model/basic-auth/ir.json index 640dee5a59b..5f44dcbc08e 100644 --- a/seed/csharp-model/basic-auth/ir.json +++ b/seed/csharp-model/basic-auth/ir.json @@ -851,6 +851,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_basic-auth": { "name": { @@ -872,6 +873,7 @@ "safeName": "BasicAuth" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -941,6 +943,7 @@ "safeName": "Errors" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1000,6 +1003,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/bearer-token-environment-variable/ir.json b/seed/csharp-model/bearer-token-environment-variable/ir.json index 435aade9e4e..e23a0611120 100644 --- a/seed/csharp-model/bearer-token-environment-variable/ir.json +++ b/seed/csharp-model/bearer-token-environment-variable/ir.json @@ -191,6 +191,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -212,6 +213,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -267,6 +269,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/bytes/ir.json b/seed/csharp-model/bytes/ir.json index 810abdac1e2..94d20683c5e 100644 --- a/seed/csharp-model/bytes/ir.json +++ b/seed/csharp-model/bytes/ir.json @@ -189,6 +189,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -210,6 +211,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -265,6 +267,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/circular-references/ir.json b/seed/csharp-model/circular-references/ir.json index 05a7ff0f868..4648c3c16cf 100644 --- a/seed/csharp-model/circular-references/ir.json +++ b/seed/csharp-model/circular-references/ir.json @@ -1321,6 +1321,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_a": { "name": { @@ -1342,6 +1343,7 @@ "safeName": "A" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1412,6 +1414,7 @@ "safeName": "Ast" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1471,6 +1474,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:ImportingA", "type_:RootType" diff --git a/seed/csharp-model/custom-auth/ir.json b/seed/csharp-model/custom-auth/ir.json index a64ac5ae4bf..13f8cdb539c 100644 --- a/seed/csharp-model/custom-auth/ir.json +++ b/seed/csharp-model/custom-auth/ir.json @@ -839,6 +839,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_custom-auth": { "name": { @@ -860,6 +861,7 @@ "safeName": "CustomAuth" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -929,6 +931,7 @@ "safeName": "Errors" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -988,6 +991,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/error-property/ir.json b/seed/csharp-model/error-property/ir.json index 0561bfd10b5..864903cfccf 100644 --- a/seed/csharp-model/error-property/ir.json +++ b/seed/csharp-model/error-property/ir.json @@ -542,6 +542,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_errors": { "name": { @@ -563,6 +564,7 @@ "safeName": "Errors" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -635,6 +637,7 @@ "safeName": "PropertyBasedError" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -690,6 +693,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/exhaustive/ir.json b/seed/csharp-model/exhaustive/ir.json index c17958c268c..f26125f03f8 100644 --- a/seed/csharp-model/exhaustive/ir.json +++ b/seed/csharp-model/exhaustive/ir.json @@ -13787,6 +13787,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_endpoints": { "name": { @@ -13808,6 +13809,7 @@ "safeName": "Endpoints" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -13885,6 +13887,7 @@ "safeName": "Container" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -13993,6 +13996,7 @@ "safeName": "Enum" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14101,6 +14105,7 @@ "safeName": "HttpMethods" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14209,6 +14214,7 @@ "safeName": "Object" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14317,6 +14323,7 @@ "safeName": "Params" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14425,6 +14432,7 @@ "safeName": "Primitive" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14533,6 +14541,7 @@ "safeName": "Union" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14641,6 +14650,7 @@ "safeName": "GeneralErrors" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14713,6 +14723,7 @@ "safeName": "InlinedRequests" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14782,6 +14793,7 @@ "safeName": "NoAuth" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14851,6 +14863,7 @@ "safeName": "NoReqBody" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14920,6 +14933,7 @@ "safeName": "ReqWithHeaders" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14989,6 +15003,7 @@ "safeName": "Types" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -15062,6 +15077,7 @@ "safeName": "Enum" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -15173,6 +15189,7 @@ "safeName": "Object" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -15291,6 +15308,7 @@ "safeName": "Union" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -15390,6 +15408,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/extends/ir.json b/seed/csharp-model/extends/ir.json index c91925c42cc..8543b185e4e 100644 --- a/seed/csharp-model/extends/ir.json +++ b/seed/csharp-model/extends/ir.json @@ -1024,12 +1024,14 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": {}, "rootPackage": { "fernFilepath": { "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:ExampleType", "type_:NestedType", diff --git a/seed/csharp-model/file-download/ir.json b/seed/csharp-model/file-download/ir.json index 4ba988ba128..b874ee3ff04 100644 --- a/seed/csharp-model/file-download/ir.json +++ b/seed/csharp-model/file-download/ir.json @@ -159,6 +159,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -180,6 +181,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -235,6 +237,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/file-upload/ir.json b/seed/csharp-model/file-upload/ir.json index 71702d8f2d7..94dc9d97607 100644 --- a/seed/csharp-model/file-upload/ir.json +++ b/seed/csharp-model/file-upload/ir.json @@ -1862,6 +1862,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -1883,6 +1884,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1942,6 +1944,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/folders/ir.json b/seed/csharp-model/folders/ir.json index 4563d0ade70..34477661e78 100644 --- a/seed/csharp-model/folders/ir.json +++ b/seed/csharp-model/folders/ir.json @@ -1087,6 +1087,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_a": { "name": { @@ -1108,6 +1109,7 @@ "safeName": "A" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1181,6 +1183,7 @@ "safeName": "B" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1289,6 +1292,7 @@ "safeName": "C" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1397,6 +1401,7 @@ "safeName": "Folder" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1469,6 +1474,7 @@ "safeName": "D" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1578,6 +1584,7 @@ "safeName": "Types" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1725,6 +1732,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1821,6 +1829,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "service": "service_", "types": [], "errors": [], diff --git a/seed/csharp-model/idempotency-headers/ir.json b/seed/csharp-model/idempotency-headers/ir.json index 399b9284e98..305c5e91ca4 100644 --- a/seed/csharp-model/idempotency-headers/ir.json +++ b/seed/csharp-model/idempotency-headers/ir.json @@ -681,6 +681,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_payment": { "name": { @@ -702,6 +703,7 @@ "safeName": "Payment" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -759,6 +761,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/imdb/ir.json b/seed/csharp-model/imdb/ir.json index 35e97880313..4848df47c5f 100644 --- a/seed/csharp-model/imdb/ir.json +++ b/seed/csharp-model/imdb/ir.json @@ -1378,6 +1378,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_imdb": { "name": { @@ -1399,6 +1400,7 @@ "safeName": "Imdb" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1460,6 +1462,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/literal-headers/ir.json b/seed/csharp-model/literal-headers/ir.json new file mode 100644 index 00000000000..3e8b2d4ea36 --- /dev/null +++ b/seed/csharp-model/literal-headers/ir.json @@ -0,0 +1,1394 @@ +{ + "apiName": { + "originalName": "literal-headers", + "camelCase": { + "unsafeName": "literalHeaders", + "safeName": "literalHeaders" + }, + "snakeCase": { + "unsafeName": "literal_headers", + "safeName": "literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_HEADERS", + "safeName": "LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "LiteralHeaders", + "safeName": "LiteralHeaders" + } + }, + "auth": { + "requirement": "ALL", + "schemes": [] + }, + "headers": [ + { + "name": { + "name": { + "originalName": "apiHeader", + "camelCase": { + "unsafeName": "apiHeader", + "safeName": "apiHeader" + }, + "snakeCase": { + "unsafeName": "api_header", + "safeName": "api_header" + }, + "screamingSnakeCase": { + "unsafeName": "API_HEADER", + "safeName": "API_HEADER" + }, + "pascalCase": { + "unsafeName": "ApiHeader", + "safeName": "ApiHeader" + } + }, + "wireValue": "X-API-Header" + }, + "valueType": { + "container": { + "literal": { + "string": "api header value", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "apiTest", + "camelCase": { + "unsafeName": "apiTest", + "safeName": "apiTest" + }, + "snakeCase": { + "unsafeName": "api_test", + "safeName": "api_test" + }, + "screamingSnakeCase": { + "unsafeName": "API_TEST", + "safeName": "API_TEST" + }, + "pascalCase": { + "unsafeName": "ApiTest", + "safeName": "ApiTest" + } + }, + "wireValue": "X-API-Test" + }, + "valueType": { + "container": { + "literal": { + "boolean": false, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "idempotencyHeaders": [], + "types": {}, + "errors": {}, + "services": { + "service_no-headers": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + } + } + }, + "basePath": { + "head": "/no-headers", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_no-headers.get", + "name": { + "originalName": "get", + "camelCase": { + "unsafeName": "get", + "safeName": "get" + }, + "snakeCase": { + "unsafeName": "get", + "safeName": "get" + }, + "screamingSnakeCase": { + "unsafeName": "GET", + "safeName": "GET" + }, + "pascalCase": { + "unsafeName": "Get", + "safeName": "Get" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "", + "parts": [] + }, + "fullPath": { + "head": "/no-headers", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "errors": [], + "examples": [] + } + ] + }, + "service_only-literal-headers": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + } + } + }, + "basePath": { + "head": "/only-literal-headers", + "parts": [] + }, + "headers": [ + { + "name": { + "name": { + "originalName": "literalServiceHeader", + "camelCase": { + "unsafeName": "literalServiceHeader", + "safeName": "literalServiceHeader" + }, + "snakeCase": { + "unsafeName": "literal_service_header", + "safeName": "literal_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_SERVICE_HEADER", + "safeName": "LITERAL_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralServiceHeader", + "safeName": "LiteralServiceHeader" + } + }, + "wireValue": "literalServiceHeader" + }, + "valueType": { + "container": { + "literal": { + "string": "service header", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_only-literal-headers.get", + "name": { + "originalName": "get", + "camelCase": { + "unsafeName": "get", + "safeName": "get" + }, + "snakeCase": { + "unsafeName": "get", + "safeName": "get" + }, + "screamingSnakeCase": { + "unsafeName": "GET", + "safeName": "GET" + }, + "pascalCase": { + "unsafeName": "Get", + "safeName": "Get" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "", + "parts": [] + }, + "fullPath": { + "head": "/only-literal-headers", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [ + { + "name": { + "name": { + "originalName": "literalEndpointHeader", + "camelCase": { + "unsafeName": "literalEndpointHeader", + "safeName": "literalEndpointHeader" + }, + "snakeCase": { + "unsafeName": "literal_endpoint_header", + "safeName": "literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_ENDPOINT_HEADER", + "safeName": "LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralEndpointHeader", + "safeName": "LiteralEndpointHeader" + } + }, + "wireValue": "literalEndpointHeader" + }, + "valueType": { + "container": { + "literal": { + "string": "endpoint header", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "falseEndpointHeader", + "camelCase": { + "unsafeName": "falseEndpointHeader", + "safeName": "falseEndpointHeader" + }, + "snakeCase": { + "unsafeName": "false_endpoint_header", + "safeName": "false_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "FALSE_ENDPOINT_HEADER", + "safeName": "FALSE_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "FalseEndpointHeader", + "safeName": "FalseEndpointHeader" + } + }, + "wireValue": "falseEndpointHeader" + }, + "valueType": { + "container": { + "literal": { + "boolean": false, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "errors": [], + "examples": [ + { + "url": "/only-literal-headers", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [ + { + "name": { + "name": { + "originalName": "literalEndpointHeader", + "camelCase": { + "unsafeName": "literalEndpointHeader", + "safeName": "literalEndpointHeader" + }, + "snakeCase": { + "unsafeName": "literal_endpoint_header", + "safeName": "literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_ENDPOINT_HEADER", + "safeName": "LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralEndpointHeader", + "safeName": "LiteralEndpointHeader" + } + }, + "wireValue": "literalEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "endpoint header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "endpoint header" + } + }, + { + "name": { + "name": { + "originalName": "falseEndpointHeader", + "camelCase": { + "unsafeName": "falseEndpointHeader", + "safeName": "falseEndpointHeader" + }, + "snakeCase": { + "unsafeName": "false_endpoint_header", + "safeName": "false_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "FALSE_ENDPOINT_HEADER", + "safeName": "FALSE_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "FalseEndpointHeader", + "safeName": "FalseEndpointHeader" + } + }, + "wireValue": "falseEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "boolean": false, + "type": "boolean" + }, + "type": "primitive" + }, + "jsonExample": false + } + } + ], + "serviceHeaders": [ + { + "name": { + "name": { + "originalName": "literalServiceHeader", + "camelCase": { + "unsafeName": "literalServiceHeader", + "safeName": "literalServiceHeader" + }, + "snakeCase": { + "unsafeName": "literal_service_header", + "safeName": "literal_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_SERVICE_HEADER", + "safeName": "LITERAL_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralServiceHeader", + "safeName": "LiteralServiceHeader" + } + }, + "wireValue": "literalServiceHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "service header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "service header" + } + } + ], + "queryParameters": [], + "response": { + "type": "ok" + } + } + ] + } + ] + }, + "service_with-non-literal-headers": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + } + } + }, + "basePath": { + "head": "/with-non-literal-headers", + "parts": [] + }, + "headers": [ + { + "name": { + "name": { + "originalName": "integer", + "camelCase": { + "unsafeName": "integer", + "safeName": "integer" + }, + "snakeCase": { + "unsafeName": "integer", + "safeName": "integer" + }, + "screamingSnakeCase": { + "unsafeName": "INTEGER", + "safeName": "INTEGER" + }, + "pascalCase": { + "unsafeName": "Integer", + "safeName": "Integer" + } + }, + "wireValue": "integer" + }, + "valueType": { + "primitive": "INTEGER", + "type": "primitive" + } + }, + { + "name": { + "name": { + "originalName": "maybeInteger", + "camelCase": { + "unsafeName": "maybeInteger", + "safeName": "maybeInteger" + }, + "snakeCase": { + "unsafeName": "maybe_integer", + "safeName": "maybe_integer" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_INTEGER", + "safeName": "MAYBE_INTEGER" + }, + "pascalCase": { + "unsafeName": "MaybeInteger", + "safeName": "MaybeInteger" + } + }, + "wireValue": "maybeInteger" + }, + "valueType": { + "container": { + "optional": { + "primitive": "INTEGER", + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "literalServiceHeader", + "camelCase": { + "unsafeName": "literalServiceHeader", + "safeName": "literalServiceHeader" + }, + "snakeCase": { + "unsafeName": "literal_service_header", + "safeName": "literal_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_SERVICE_HEADER", + "safeName": "LITERAL_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralServiceHeader", + "safeName": "LiteralServiceHeader" + } + }, + "wireValue": "literalServiceHeader" + }, + "valueType": { + "container": { + "literal": { + "string": "service header", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "trueServiceHeader", + "camelCase": { + "unsafeName": "trueServiceHeader", + "safeName": "trueServiceHeader" + }, + "snakeCase": { + "unsafeName": "true_service_header", + "safeName": "true_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "TRUE_SERVICE_HEADER", + "safeName": "TRUE_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "TrueServiceHeader", + "safeName": "TrueServiceHeader" + } + }, + "wireValue": "trueServiceHeader" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_with-non-literal-headers.get", + "name": { + "originalName": "get", + "camelCase": { + "unsafeName": "get", + "safeName": "get" + }, + "snakeCase": { + "unsafeName": "get", + "safeName": "get" + }, + "screamingSnakeCase": { + "unsafeName": "GET", + "safeName": "GET" + }, + "pascalCase": { + "unsafeName": "Get", + "safeName": "Get" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "", + "parts": [] + }, + "fullPath": { + "head": "/with-non-literal-headers", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [ + { + "name": { + "name": { + "originalName": "nonLiteralEndpointHeader", + "camelCase": { + "unsafeName": "nonLiteralEndpointHeader", + "safeName": "nonLiteralEndpointHeader" + }, + "snakeCase": { + "unsafeName": "non_literal_endpoint_header", + "safeName": "non_literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "NON_LITERAL_ENDPOINT_HEADER", + "safeName": "NON_LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "NonLiteralEndpointHeader", + "safeName": "NonLiteralEndpointHeader" + } + }, + "wireValue": "nonLiteralEndpointHeader" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + { + "name": { + "name": { + "originalName": "literalEndpointHeader", + "camelCase": { + "unsafeName": "literalEndpointHeader", + "safeName": "literalEndpointHeader" + }, + "snakeCase": { + "unsafeName": "literal_endpoint_header", + "safeName": "literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_ENDPOINT_HEADER", + "safeName": "LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralEndpointHeader", + "safeName": "LiteralEndpointHeader" + } + }, + "wireValue": "literalEndpointHeader" + }, + "valueType": { + "container": { + "literal": { + "string": "endpoint header", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "trueEndpointHeader", + "camelCase": { + "unsafeName": "trueEndpointHeader", + "safeName": "trueEndpointHeader" + }, + "snakeCase": { + "unsafeName": "true_endpoint_header", + "safeName": "true_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "TRUE_ENDPOINT_HEADER", + "safeName": "TRUE_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "TrueEndpointHeader", + "safeName": "TrueEndpointHeader" + } + }, + "wireValue": "trueEndpointHeader" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "WithNonLiteralHeadersRequest", + "camelCase": { + "unsafeName": "withNonLiteralHeadersRequest", + "safeName": "withNonLiteralHeadersRequest" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers_request", + "safeName": "with_non_literal_headers_request" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS_REQUEST", + "safeName": "WITH_NON_LITERAL_HEADERS_REQUEST" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeadersRequest", + "safeName": "WithNonLiteralHeadersRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + } + }, + "errors": [], + "examples": [ + { + "url": "/with-non-literal-headers", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [ + { + "name": { + "name": { + "originalName": "nonLiteralEndpointHeader", + "camelCase": { + "unsafeName": "nonLiteralEndpointHeader", + "safeName": "nonLiteralEndpointHeader" + }, + "snakeCase": { + "unsafeName": "non_literal_endpoint_header", + "safeName": "non_literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "NON_LITERAL_ENDPOINT_HEADER", + "safeName": "NON_LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "NonLiteralEndpointHeader", + "safeName": "NonLiteralEndpointHeader" + } + }, + "wireValue": "nonLiteralEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "custom header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "custom header" + } + }, + { + "name": { + "name": { + "originalName": "literalEndpointHeader", + "camelCase": { + "unsafeName": "literalEndpointHeader", + "safeName": "literalEndpointHeader" + }, + "snakeCase": { + "unsafeName": "literal_endpoint_header", + "safeName": "literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_ENDPOINT_HEADER", + "safeName": "LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralEndpointHeader", + "safeName": "LiteralEndpointHeader" + } + }, + "wireValue": "literalEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "endpoint header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "endpoint header" + } + }, + { + "name": { + "name": { + "originalName": "trueEndpointHeader", + "camelCase": { + "unsafeName": "trueEndpointHeader", + "safeName": "trueEndpointHeader" + }, + "snakeCase": { + "unsafeName": "true_endpoint_header", + "safeName": "true_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "TRUE_ENDPOINT_HEADER", + "safeName": "TRUE_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "TrueEndpointHeader", + "safeName": "TrueEndpointHeader" + } + }, + "wireValue": "trueEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "boolean": true, + "type": "boolean" + }, + "type": "primitive" + }, + "jsonExample": true + } + } + ], + "serviceHeaders": [ + { + "name": { + "name": { + "originalName": "integer", + "camelCase": { + "unsafeName": "integer", + "safeName": "integer" + }, + "snakeCase": { + "unsafeName": "integer", + "safeName": "integer" + }, + "screamingSnakeCase": { + "unsafeName": "INTEGER", + "safeName": "INTEGER" + }, + "pascalCase": { + "unsafeName": "Integer", + "safeName": "Integer" + } + }, + "wireValue": "integer" + }, + "value": { + "shape": { + "primitive": { + "integer": 42, + "type": "integer" + }, + "type": "primitive" + }, + "jsonExample": 42 + } + }, + { + "name": { + "name": { + "originalName": "literalServiceHeader", + "camelCase": { + "unsafeName": "literalServiceHeader", + "safeName": "literalServiceHeader" + }, + "snakeCase": { + "unsafeName": "literal_service_header", + "safeName": "literal_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_SERVICE_HEADER", + "safeName": "LITERAL_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralServiceHeader", + "safeName": "LiteralServiceHeader" + } + }, + "wireValue": "literalServiceHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "service header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "service header" + } + }, + { + "name": { + "name": { + "originalName": "trueServiceHeader", + "camelCase": { + "unsafeName": "trueServiceHeader", + "safeName": "trueServiceHeader" + }, + "snakeCase": { + "unsafeName": "true_service_header", + "safeName": "true_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "TRUE_SERVICE_HEADER", + "safeName": "TRUE_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "TrueServiceHeader", + "safeName": "TrueServiceHeader" + } + }, + "wireValue": "trueServiceHeader" + }, + "value": { + "shape": { + "primitive": { + "boolean": true, + "type": "boolean" + }, + "type": "primitive" + }, + "jsonExample": true + } + } + ], + "queryParameters": [], + "response": { + "type": "ok" + } + } + ] + } + ] + } + }, + "constants": { + "errorInstanceIdKey": { + "name": { + "originalName": "errorInstanceId", + "camelCase": { + "unsafeName": "errorInstanceId", + "safeName": "errorInstanceId" + }, + "snakeCase": { + "unsafeName": "error_instance_id", + "safeName": "error_instance_id" + }, + "screamingSnakeCase": { + "unsafeName": "ERROR_INSTANCE_ID", + "safeName": "ERROR_INSTANCE_ID" + }, + "pascalCase": { + "unsafeName": "ErrorInstanceId", + "safeName": "ErrorInstanceId" + } + }, + "wireValue": "errorInstanceId" + } + }, + "errorDiscriminationStrategy": { + "type": "statusCode" + }, + "pathParameters": [], + "variables": [], + "serviceTypeReferenceInfo": { + "typesReferencedOnlyByService": {}, + "sharedTypes": [] + }, + "webhookGroups": {}, + "websocketChannels": {}, + "subpackages": { + "subpackage_no-headers": { + "name": { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + }, + "websocket": null, + "fernFilepath": { + "allParts": [ + { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + } + }, + "service": "service_no-headers", + "types": [], + "errors": [], + "subpackages": [], + "hasEndpointsInTree": true + }, + "subpackage_only-literal-headers": { + "name": { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + }, + "websocket": null, + "fernFilepath": { + "allParts": [ + { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + } + }, + "service": "service_only-literal-headers", + "types": [], + "errors": [], + "subpackages": [], + "hasEndpointsInTree": true + }, + "subpackage_with-non-literal-headers": { + "name": { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + }, + "websocket": null, + "fernFilepath": { + "allParts": [ + { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + } + }, + "service": "service_with-non-literal-headers", + "types": [], + "errors": [], + "subpackages": [], + "hasEndpointsInTree": true + } + }, + "rootPackage": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "websocket": null, + "types": [], + "errors": [], + "subpackages": [ + "subpackage_no-headers", + "subpackage_only-literal-headers", + "subpackage_with-non-literal-headers" + ], + "hasEndpointsInTree": true + }, + "sdkConfig": { + "isAuthMandatory": false, + "hasStreamingEndpoints": false, + "hasFileDownloadEndpoints": false, + "platformHeaders": { + "language": "X-Fern-Language", + "sdkName": "X-Fern-SDK-Name", + "sdkVersion": "X-Fern-SDK-Version" + } + } +} \ No newline at end of file diff --git a/seed/csharp-model/literal-headers/snippet.json b/seed/csharp-model/literal-headers/snippet.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/csharp-model/literal/ir.json b/seed/csharp-model/literal/ir.json index 6de6e8cae0c..3611944ef58 100644 --- a/seed/csharp-model/literal/ir.json +++ b/seed/csharp-model/literal/ir.json @@ -221,71 +221,71 @@ "referencedTypes": {}, "examples": [] }, - "type_reference:SendRequest": { + "type_literal:Options": { "name": { "name": { - "originalName": "SendRequest", + "originalName": "Options", "camelCase": { - "unsafeName": "sendRequest", - "safeName": "sendRequest" + "unsafeName": "options", + "safeName": "options" }, "snakeCase": { - "unsafeName": "send_request", - "safeName": "send_request" + "unsafeName": "options", + "safeName": "options" }, "screamingSnakeCase": { - "unsafeName": "SEND_REQUEST", - "safeName": "SEND_REQUEST" + "unsafeName": "OPTIONS", + "safeName": "OPTIONS" }, "pascalCase": { - "unsafeName": "SendRequest", - "safeName": "SendRequest" + "unsafeName": "Options", + "safeName": "Options" } }, "fernFilepath": { "allParts": [ { - "originalName": "reference", + "originalName": "literal", "camelCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "REFERENCE", - "safeName": "REFERENCE" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Reference", - "safeName": "Reference" + "unsafeName": "Literal", + "safeName": "Literal" } } ], "packagePath": [], "file": { - "originalName": "reference", + "originalName": "literal", "camelCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "REFERENCE", - "safeName": "REFERENCE" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Reference", - "safeName": "Reference" + "unsafeName": "Literal", + "safeName": "Literal" } } }, - "typeId": "type_reference:SendRequest" + "typeId": "type_literal:Options" }, "shape": { "type": "object", @@ -294,30 +294,30 @@ { "name": { "name": { - "originalName": "prompt", + "originalName": "id", "camelCase": { - "unsafeName": "prompt", - "safeName": "prompt" + "unsafeName": "id", + "safeName": "id" }, "snakeCase": { - "unsafeName": "prompt", - "safeName": "prompt" + "unsafeName": "id", + "safeName": "id" }, "screamingSnakeCase": { - "unsafeName": "PROMPT", - "safeName": "PROMPT" + "unsafeName": "ID", + "safeName": "ID" }, "pascalCase": { - "unsafeName": "Prompt", - "safeName": "Prompt" + "unsafeName": "Id", + "safeName": "Id" } }, - "wireValue": "prompt" + "wireValue": "id" }, "valueType": { "container": { "literal": { - "string": "You are a helpful assistant", + "string": "options", "type": "string" }, "type": "literal" @@ -328,445 +328,987 @@ { "name": { "name": { - "originalName": "query", + "originalName": "enabled", "camelCase": { - "unsafeName": "query", - "safeName": "query" + "unsafeName": "enabled", + "safeName": "enabled" }, "snakeCase": { - "unsafeName": "query", - "safeName": "query" + "unsafeName": "enabled", + "safeName": "enabled" }, "screamingSnakeCase": { - "unsafeName": "QUERY", - "safeName": "QUERY" + "unsafeName": "ENABLED", + "safeName": "ENABLED" }, "pascalCase": { - "unsafeName": "Query", - "safeName": "Query" + "unsafeName": "Enabled", + "safeName": "Enabled" } }, - "wireValue": "query" + "wireValue": "enabled" }, "valueType": { - "primitive": "STRING", - "type": "primitive" + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" } }, { "name": { "name": { - "originalName": "stream", + "originalName": "values", "camelCase": { - "unsafeName": "stream", - "safeName": "stream" + "unsafeName": "values", + "safeName": "values" }, "snakeCase": { - "unsafeName": "stream", - "safeName": "stream" + "unsafeName": "values", + "safeName": "values" }, "screamingSnakeCase": { - "unsafeName": "STREAM", - "safeName": "STREAM" + "unsafeName": "VALUES", + "safeName": "VALUES" }, "pascalCase": { - "unsafeName": "Stream", - "safeName": "Stream" + "unsafeName": "Values", + "safeName": "Values" } }, - "wireValue": "stream" + "wireValue": "values" }, "valueType": { + "container": { + "type": "map", + "keyType": { + "primitive": "STRING", + "type": "primitive" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + "type": "container" + } + } + ] + }, + "referencedTypes": {}, + "examples": [] + }, + "type_literal:UndiscriminatedOptions": { + "name": { + "name": { + "originalName": "UndiscriminatedOptions", + "camelCase": { + "unsafeName": "undiscriminatedOptions", + "safeName": "undiscriminatedOptions" + }, + "snakeCase": { + "unsafeName": "undiscriminated_options", + "safeName": "undiscriminated_options" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_OPTIONS", + "safeName": "UNDISCRIMINATED_OPTIONS" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedOptions", + "safeName": "UndiscriminatedOptions" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "typeId": "type_literal:UndiscriminatedOptions" + }, + "shape": { + "type": "undiscriminatedUnion", + "members": [ + { + "type": { "container": { "literal": { - "boolean": false, + "string": "options", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "type": { + "container": { + "literal": { + "boolean": true, "type": "boolean" }, "type": "literal" }, "type": "container" } + }, + { + "type": { + "container": { + "type": "map", + "keyType": { + "primitive": "STRING", + "type": "primitive" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + "type": "container" + } } ] }, "referencedTypes": {}, "examples": [] - } - }, - "errors": {}, - "services": { - "service_headers": { + }, + "type_literal:CreateOptionsResponse": { "name": { + "name": { + "originalName": "CreateOptionsResponse", + "camelCase": { + "unsafeName": "createOptionsResponse", + "safeName": "createOptionsResponse" + }, + "snakeCase": { + "unsafeName": "create_options_response", + "safeName": "create_options_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS_RESPONSE", + "safeName": "CREATE_OPTIONS_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateOptionsResponse", + "safeName": "CreateOptionsResponse" + } + }, "fernFilepath": { "allParts": [ { - "originalName": "headers", + "originalName": "literal", "camelCase": { - "unsafeName": "headers", - "safeName": "headers" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "headers", - "safeName": "headers" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "HEADERS", - "safeName": "HEADERS" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Headers", - "safeName": "Headers" + "unsafeName": "Literal", + "safeName": "Literal" } } ], "packagePath": [], "file": { - "originalName": "headers", + "originalName": "literal", "camelCase": { - "unsafeName": "headers", - "safeName": "headers" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "headers", - "safeName": "headers" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "HEADERS", - "safeName": "HEADERS" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Headers", - "safeName": "Headers" + "unsafeName": "Literal", + "safeName": "Literal" } } - } - }, - "basePath": { - "head": "", - "parts": [] + }, + "typeId": "type_literal:CreateOptionsResponse" }, - "headers": [], - "pathParameters": [], - "endpoints": [ - { - "id": "endpoint_headers.send", + "shape": { + "type": "union", + "discriminant": { "name": { - "originalName": "send", + "originalName": "type", "camelCase": { - "unsafeName": "send", - "safeName": "send" + "unsafeName": "type", + "safeName": "type" }, "snakeCase": { - "unsafeName": "send", - "safeName": "send" + "unsafeName": "type", + "safeName": "type" }, "screamingSnakeCase": { - "unsafeName": "SEND", - "safeName": "SEND" + "unsafeName": "TYPE", + "safeName": "TYPE" }, "pascalCase": { - "unsafeName": "Send", - "safeName": "Send" + "unsafeName": "Type", + "safeName": "Type" } }, - "auth": false, - "idempotent": false, - "method": "POST", - "path": { - "head": "/headers", - "parts": [] - }, - "fullPath": { - "head": "headers", - "parts": [] - }, - "pathParameters": [], - "allPathParameters": [], - "queryParameters": [], - "headers": [ - { + "wireValue": "type" + }, + "extends": [], + "baseProperties": [], + "types": [ + { + "discriminantValue": { + "name": { + "originalName": "ok", + "camelCase": { + "unsafeName": "ok", + "safeName": "ok" + }, + "snakeCase": { + "unsafeName": "ok", + "safeName": "ok" + }, + "screamingSnakeCase": { + "unsafeName": "OK", + "safeName": "OK" + }, + "pascalCase": { + "unsafeName": "Ok", + "safeName": "Ok" + } + }, + "wireValue": "ok" + }, + "shape": { + "propertiesType": "singleProperty", "name": { "name": { - "originalName": "endpointVersion", + "originalName": "value", "camelCase": { - "unsafeName": "endpointVersion", - "safeName": "endpointVersion" + "unsafeName": "value", + "safeName": "value" }, "snakeCase": { - "unsafeName": "endpoint_version", - "safeName": "endpoint_version" + "unsafeName": "value", + "safeName": "value" }, "screamingSnakeCase": { - "unsafeName": "ENDPOINT_VERSION", - "safeName": "ENDPOINT_VERSION" + "unsafeName": "VALUE", + "safeName": "VALUE" }, "pascalCase": { - "unsafeName": "EndpointVersion", - "safeName": "EndpointVersion" + "unsafeName": "Value", + "safeName": "Value" } }, - "wireValue": "X-Endpoint-Version" + "wireValue": "value" }, - "valueType": { + "type": { "container": { "literal": { - "string": "02-12-2024", - "type": "string" + "boolean": true, + "type": "boolean" }, "type": "literal" }, "type": "container" } + } + }, + { + "discriminantValue": { + "name": { + "originalName": "options", + "camelCase": { + "unsafeName": "options", + "safeName": "options" + }, + "snakeCase": { + "unsafeName": "options", + "safeName": "options" + }, + "screamingSnakeCase": { + "unsafeName": "OPTIONS", + "safeName": "OPTIONS" + }, + "pascalCase": { + "unsafeName": "Options", + "safeName": "Options" + } + }, + "wireValue": "options" }, - { + "shape": { + "propertiesType": "samePropertiesAsObject", "name": { - "name": { - "originalName": "async", + "originalName": "Options", + "camelCase": { + "unsafeName": "options", + "safeName": "options" + }, + "snakeCase": { + "unsafeName": "options", + "safeName": "options" + }, + "screamingSnakeCase": { + "unsafeName": "OPTIONS", + "safeName": "OPTIONS" + }, + "pascalCase": { + "unsafeName": "Options", + "safeName": "Options" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", "camelCase": { - "unsafeName": "async", - "safeName": "async" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "async", - "safeName": "async" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "ASYNC", - "safeName": "ASYNC" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Async", - "safeName": "Async" + "unsafeName": "Literal", + "safeName": "Literal" } - }, - "wireValue": "X-Async" + } }, - "valueType": { - "container": { - "literal": { - "boolean": true, - "type": "boolean" - }, - "type": "literal" - }, - "type": "container" - } + "typeId": "type_literal:Options" } - ], - "requestBody": { - "type": "inlinedRequestBody", - "name": { - "originalName": "SendLiteralsInHeadersRequest", + } + ] + }, + "referencedTypes": {}, + "examples": [] + }, + "type_reference:SendRequest": { + "name": { + "name": { + "originalName": "SendRequest", + "camelCase": { + "unsafeName": "sendRequest", + "safeName": "sendRequest" + }, + "snakeCase": { + "unsafeName": "send_request", + "safeName": "send_request" + }, + "screamingSnakeCase": { + "unsafeName": "SEND_REQUEST", + "safeName": "SEND_REQUEST" + }, + "pascalCase": { + "unsafeName": "SendRequest", + "safeName": "SendRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "reference", "camelCase": { - "unsafeName": "sendLiteralsInHeadersRequest", - "safeName": "sendLiteralsInHeadersRequest" + "unsafeName": "reference", + "safeName": "reference" }, "snakeCase": { - "unsafeName": "send_literals_in_headers_request", - "safeName": "send_literals_in_headers_request" + "unsafeName": "reference", + "safeName": "reference" }, "screamingSnakeCase": { - "unsafeName": "SEND_LITERALS_IN_HEADERS_REQUEST", - "safeName": "SEND_LITERALS_IN_HEADERS_REQUEST" + "unsafeName": "REFERENCE", + "safeName": "REFERENCE" }, "pascalCase": { - "unsafeName": "SendLiteralsInHeadersRequest", - "safeName": "SendLiteralsInHeadersRequest" + "unsafeName": "Reference", + "safeName": "Reference" } + } + ], + "packagePath": [], + "file": { + "originalName": "reference", + "camelCase": { + "unsafeName": "reference", + "safeName": "reference" }, - "extends": [], - "properties": [ - { - "name": { - "name": { - "originalName": "query", - "camelCase": { - "unsafeName": "query", - "safeName": "query" - }, - "snakeCase": { - "unsafeName": "query", - "safeName": "query" - }, - "screamingSnakeCase": { - "unsafeName": "QUERY", - "safeName": "QUERY" - }, - "pascalCase": { - "unsafeName": "Query", - "safeName": "Query" - } - }, - "wireValue": "query" - }, - "valueType": { - "primitive": "STRING", - "type": "primitive" - } - } - ] - }, - "sdkRequest": { - "shape": { - "type": "wrapper", - "wrapperName": { - "originalName": "SendLiteralsInHeadersRequest", + "snakeCase": { + "unsafeName": "reference", + "safeName": "reference" + }, + "screamingSnakeCase": { + "unsafeName": "REFERENCE", + "safeName": "REFERENCE" + }, + "pascalCase": { + "unsafeName": "Reference", + "safeName": "Reference" + } + } + }, + "typeId": "type_reference:SendRequest" + }, + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "prompt", "camelCase": { - "unsafeName": "sendLiteralsInHeadersRequest", - "safeName": "sendLiteralsInHeadersRequest" + "unsafeName": "prompt", + "safeName": "prompt" }, "snakeCase": { - "unsafeName": "send_literals_in_headers_request", - "safeName": "send_literals_in_headers_request" + "unsafeName": "prompt", + "safeName": "prompt" }, "screamingSnakeCase": { - "unsafeName": "SEND_LITERALS_IN_HEADERS_REQUEST", - "safeName": "SEND_LITERALS_IN_HEADERS_REQUEST" + "unsafeName": "PROMPT", + "safeName": "PROMPT" }, "pascalCase": { - "unsafeName": "SendLiteralsInHeadersRequest", - "safeName": "SendLiteralsInHeadersRequest" + "unsafeName": "Prompt", + "safeName": "Prompt" } }, - "bodyKey": { - "originalName": "body", + "wireValue": "prompt" + }, + "valueType": { + "container": { + "literal": { + "string": "You are a helpful assistant", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "query", "camelCase": { - "unsafeName": "body", - "safeName": "body" + "unsafeName": "query", + "safeName": "query" }, "snakeCase": { - "unsafeName": "body", - "safeName": "body" + "unsafeName": "query", + "safeName": "query" }, "screamingSnakeCase": { - "unsafeName": "BODY", - "safeName": "BODY" + "unsafeName": "QUERY", + "safeName": "QUERY" }, "pascalCase": { - "unsafeName": "Body", - "safeName": "Body" + "unsafeName": "Query", + "safeName": "Query" } - } - }, - "requestParameterName": { - "originalName": "request", - "camelCase": { - "unsafeName": "request", - "safeName": "request" - }, - "snakeCase": { - "unsafeName": "request", - "safeName": "request" - }, - "screamingSnakeCase": { - "unsafeName": "REQUEST", - "safeName": "REQUEST" }, - "pascalCase": { - "unsafeName": "Request", - "safeName": "Request" + "wireValue": "query" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + { + "name": { + "name": { + "originalName": "stream", + "camelCase": { + "unsafeName": "stream", + "safeName": "stream" + }, + "snakeCase": { + "unsafeName": "stream", + "safeName": "stream" + }, + "screamingSnakeCase": { + "unsafeName": "STREAM", + "safeName": "STREAM" + }, + "pascalCase": { + "unsafeName": "Stream", + "safeName": "Stream" + } + }, + "wireValue": "stream" + }, + "valueType": { + "container": { + "literal": { + "boolean": false, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ] + }, + "referencedTypes": {}, + "examples": [] + } + }, + "errors": {}, + "services": { + "service_headers": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "headers", + "camelCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "snakeCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "screamingSnakeCase": { + "unsafeName": "HEADERS", + "safeName": "HEADERS" + }, + "pascalCase": { + "unsafeName": "Headers", + "safeName": "Headers" } } + ], + "packagePath": [], + "file": { + "originalName": "headers", + "camelCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "snakeCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "screamingSnakeCase": { + "unsafeName": "HEADERS", + "safeName": "HEADERS" + }, + "pascalCase": { + "unsafeName": "Headers", + "safeName": "Headers" + } + } + } + }, + "basePath": { + "head": "", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_headers.send", + "name": { + "originalName": "send", + "camelCase": { + "unsafeName": "send", + "safeName": "send" + }, + "snakeCase": { + "unsafeName": "send", + "safeName": "send" + }, + "screamingSnakeCase": { + "unsafeName": "SEND", + "safeName": "SEND" + }, + "pascalCase": { + "unsafeName": "Send", + "safeName": "Send" + } }, - "response": { - "value": { - "type": "response", - "responseBodyType": { - "type": "named", + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/headers", + "parts": [] + }, + "fullPath": { + "head": "headers", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [ + { + "name": { "name": { - "originalName": "SendResponse", + "originalName": "endpointVersion", "camelCase": { - "unsafeName": "sendResponse", - "safeName": "sendResponse" + "unsafeName": "endpointVersion", + "safeName": "endpointVersion" }, "snakeCase": { - "unsafeName": "send_response", - "safeName": "send_response" + "unsafeName": "endpoint_version", + "safeName": "endpoint_version" }, "screamingSnakeCase": { - "unsafeName": "SEND_RESPONSE", - "safeName": "SEND_RESPONSE" + "unsafeName": "ENDPOINT_VERSION", + "safeName": "ENDPOINT_VERSION" }, "pascalCase": { - "unsafeName": "SendResponse", - "safeName": "SendResponse" + "unsafeName": "EndpointVersion", + "safeName": "EndpointVersion" } }, - "fernFilepath": { - "allParts": [], - "packagePath": [] + "wireValue": "X-Endpoint-Version" + }, + "valueType": { + "container": { + "literal": { + "string": "02-12-2024", + "type": "string" + }, + "type": "literal" }, - "typeId": "type_:SendResponse" + "type": "container" } }, - "type": "json" - }, - "errors": [], - "examples": [ { - "url": "/headers", - "rootPathParameters": [], - "endpointPathParameters": [], - "servicePathParameters": [], - "endpointHeaders": [ - { - "name": { - "name": { - "originalName": "endpointVersion", - "camelCase": { - "unsafeName": "endpointVersion", - "safeName": "endpointVersion" - }, - "snakeCase": { - "unsafeName": "endpoint_version", - "safeName": "endpoint_version" - }, - "screamingSnakeCase": { - "unsafeName": "ENDPOINT_VERSION", - "safeName": "ENDPOINT_VERSION" - }, - "pascalCase": { - "unsafeName": "EndpointVersion", - "safeName": "EndpointVersion" - } - }, - "wireValue": "X-Endpoint-Version" + "name": { + "name": { + "originalName": "async", + "camelCase": { + "unsafeName": "async", + "safeName": "async" }, - "value": { - "shape": { - "primitive": { - "string": { - "original": "02-12-2024" - }, - "type": "string" - }, - "type": "primitive" - }, - "jsonExample": "02-12-2024" + "snakeCase": { + "unsafeName": "async", + "safeName": "async" + }, + "screamingSnakeCase": { + "unsafeName": "ASYNC", + "safeName": "ASYNC" + }, + "pascalCase": { + "unsafeName": "Async", + "safeName": "Async" } }, - { - "name": { - "name": { - "originalName": "async", - "camelCase": { - "unsafeName": "async", - "safeName": "async" - }, - "snakeCase": { - "unsafeName": "async", - "safeName": "async" - }, - "screamingSnakeCase": { - "unsafeName": "ASYNC", - "safeName": "ASYNC" - }, - "pascalCase": { - "unsafeName": "Async", - "safeName": "Async" - } - }, - "wireValue": "X-Async" + "wireValue": "X-Async" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "SendLiteralsInHeadersRequest", + "camelCase": { + "unsafeName": "sendLiteralsInHeadersRequest", + "safeName": "sendLiteralsInHeadersRequest" + }, + "snakeCase": { + "unsafeName": "send_literals_in_headers_request", + "safeName": "send_literals_in_headers_request" + }, + "screamingSnakeCase": { + "unsafeName": "SEND_LITERALS_IN_HEADERS_REQUEST", + "safeName": "SEND_LITERALS_IN_HEADERS_REQUEST" + }, + "pascalCase": { + "unsafeName": "SendLiteralsInHeadersRequest", + "safeName": "SendLiteralsInHeadersRequest" + } + }, + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "query", + "camelCase": { + "unsafeName": "query", + "safeName": "query" + }, + "snakeCase": { + "unsafeName": "query", + "safeName": "query" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY", + "safeName": "QUERY" + }, + "pascalCase": { + "unsafeName": "Query", + "safeName": "Query" + } + }, + "wireValue": "query" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + } + ] + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "SendLiteralsInHeadersRequest", + "camelCase": { + "unsafeName": "sendLiteralsInHeadersRequest", + "safeName": "sendLiteralsInHeadersRequest" + }, + "snakeCase": { + "unsafeName": "send_literals_in_headers_request", + "safeName": "send_literals_in_headers_request" + }, + "screamingSnakeCase": { + "unsafeName": "SEND_LITERALS_IN_HEADERS_REQUEST", + "safeName": "SEND_LITERALS_IN_HEADERS_REQUEST" + }, + "pascalCase": { + "unsafeName": "SendLiteralsInHeadersRequest", + "safeName": "SendLiteralsInHeadersRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + } + }, + "response": { + "value": { + "type": "response", + "responseBodyType": { + "type": "named", + "name": { + "originalName": "SendResponse", + "camelCase": { + "unsafeName": "sendResponse", + "safeName": "sendResponse" + }, + "snakeCase": { + "unsafeName": "send_response", + "safeName": "send_response" + }, + "screamingSnakeCase": { + "unsafeName": "SEND_RESPONSE", + "safeName": "SEND_RESPONSE" + }, + "pascalCase": { + "unsafeName": "SendResponse", + "safeName": "SendResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:SendResponse" + } + }, + "type": "json" + }, + "errors": [], + "examples": [ + { + "url": "/headers", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [ + { + "name": { + "name": { + "originalName": "endpointVersion", + "camelCase": { + "unsafeName": "endpointVersion", + "safeName": "endpointVersion" + }, + "snakeCase": { + "unsafeName": "endpoint_version", + "safeName": "endpoint_version" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINT_VERSION", + "safeName": "ENDPOINT_VERSION" + }, + "pascalCase": { + "unsafeName": "EndpointVersion", + "safeName": "EndpointVersion" + } + }, + "wireValue": "X-Endpoint-Version" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "02-12-2024" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "02-12-2024" + } + }, + { + "name": { + "name": { + "originalName": "async", + "camelCase": { + "unsafeName": "async", + "safeName": "async" + }, + "snakeCase": { + "unsafeName": "async", + "safeName": "async" + }, + "screamingSnakeCase": { + "unsafeName": "ASYNC", + "safeName": "ASYNC" + }, + "pascalCase": { + "unsafeName": "Async", + "safeName": "Async" + } + }, + "wireValue": "X-Async" }, "value": { "shape": { @@ -1785,15 +2327,770 @@ ] } }, - "jsonExample": { - "message": "The weather is sunny", - "status": 200, - "success": true + "jsonExample": { + "message": "The weather is sunny", + "status": 200, + "success": true + } + } + } + } + ] + } + ] + }, + "service_literal": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + } + }, + "basePath": { + "head": "/", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_literal.createOptions", + "name": { + "originalName": "createOptions", + "camelCase": { + "unsafeName": "createOptions", + "safeName": "createOptions" + }, + "snakeCase": { + "unsafeName": "create_options", + "safeName": "create_options" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS", + "safeName": "CREATE_OPTIONS" + }, + "pascalCase": { + "unsafeName": "CreateOptions", + "safeName": "CreateOptions" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/options", + "parts": [] + }, + "fullPath": { + "head": "/options", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "CreateOptionsRequest", + "camelCase": { + "unsafeName": "createOptionsRequest", + "safeName": "createOptionsRequest" + }, + "snakeCase": { + "unsafeName": "create_options_request", + "safeName": "create_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS_REQUEST", + "safeName": "CREATE_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "CreateOptionsRequest", + "safeName": "CreateOptionsRequest" + } + }, + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "valueType": { + "container": { + "type": "map", + "keyType": { + "primitive": "STRING", + "type": "primitive" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + "type": "container" + } + } + ] + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "CreateOptionsRequest", + "camelCase": { + "unsafeName": "createOptionsRequest", + "safeName": "createOptionsRequest" + }, + "snakeCase": { + "unsafeName": "create_options_request", + "safeName": "create_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS_REQUEST", + "safeName": "CREATE_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "CreateOptionsRequest", + "safeName": "CreateOptionsRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + } + }, + "response": { + "value": { + "type": "response", + "responseBodyType": { + "type": "named", + "name": { + "originalName": "CreateOptionsResponse", + "camelCase": { + "unsafeName": "createOptionsResponse", + "safeName": "createOptionsResponse" + }, + "snakeCase": { + "unsafeName": "create_options_response", + "safeName": "create_options_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS_RESPONSE", + "safeName": "CREATE_OPTIONS_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateOptionsResponse", + "safeName": "CreateOptionsResponse" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "typeId": "type_literal:CreateOptionsResponse" + } + }, + "type": "json" + }, + "errors": [], + "examples": [] + }, + { + "id": "endpoint_literal.getOptions", + "name": { + "originalName": "getOptions", + "camelCase": { + "unsafeName": "getOptions", + "safeName": "getOptions" + }, + "snakeCase": { + "unsafeName": "get_options", + "safeName": "get_options" + }, + "screamingSnakeCase": { + "unsafeName": "GET_OPTIONS", + "safeName": "GET_OPTIONS" + }, + "pascalCase": { + "unsafeName": "GetOptions", + "safeName": "GetOptions" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/options", + "parts": [] + }, + "fullPath": { + "head": "/options", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "GetOptionsRequest", + "camelCase": { + "unsafeName": "getOptionsRequest", + "safeName": "getOptionsRequest" + }, + "snakeCase": { + "unsafeName": "get_options_request", + "safeName": "get_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_OPTIONS_REQUEST", + "safeName": "GET_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetOptionsRequest", + "safeName": "GetOptionsRequest" + } + }, + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "dryRun", + "camelCase": { + "unsafeName": "dryRun", + "safeName": "dryRun" + }, + "snakeCase": { + "unsafeName": "dry_run", + "safeName": "dry_run" + }, + "screamingSnakeCase": { + "unsafeName": "DRY_RUN", + "safeName": "DRY_RUN" + }, + "pascalCase": { + "unsafeName": "DryRun", + "safeName": "DryRun" + } + }, + "wireValue": "dryRun" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ] + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "GetOptionsRequest", + "camelCase": { + "unsafeName": "getOptionsRequest", + "safeName": "getOptionsRequest" + }, + "snakeCase": { + "unsafeName": "get_options_request", + "safeName": "get_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_OPTIONS_REQUEST", + "safeName": "GET_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetOptionsRequest", + "safeName": "GetOptionsRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + } + }, + "response": { + "value": { + "type": "response", + "responseBodyType": { + "type": "named", + "name": { + "originalName": "Options", + "camelCase": { + "unsafeName": "options", + "safeName": "options" + }, + "snakeCase": { + "unsafeName": "options", + "safeName": "options" + }, + "screamingSnakeCase": { + "unsafeName": "OPTIONS", + "safeName": "OPTIONS" + }, + "pascalCase": { + "unsafeName": "Options", + "safeName": "Options" } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "typeId": "type_literal:Options" + } + }, + "type": "json" + }, + "errors": [], + "examples": [] + }, + { + "id": "endpoint_literal.getUndiscriminatedOptions", + "name": { + "originalName": "getUndiscriminatedOptions", + "camelCase": { + "unsafeName": "getUndiscriminatedOptions", + "safeName": "getUndiscriminatedOptions" + }, + "snakeCase": { + "unsafeName": "get_undiscriminated_options", + "safeName": "get_undiscriminated_options" + }, + "screamingSnakeCase": { + "unsafeName": "GET_UNDISCRIMINATED_OPTIONS", + "safeName": "GET_UNDISCRIMINATED_OPTIONS" + }, + "pascalCase": { + "unsafeName": "GetUndiscriminatedOptions", + "safeName": "GetUndiscriminatedOptions" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/options", + "parts": [] + }, + "fullPath": { + "head": "/options", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "GetUndiscriminatedOptionsRequest", + "camelCase": { + "unsafeName": "getUndiscriminatedOptionsRequest", + "safeName": "getUndiscriminatedOptionsRequest" + }, + "snakeCase": { + "unsafeName": "get_undiscriminated_options_request", + "safeName": "get_undiscriminated_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_UNDISCRIMINATED_OPTIONS_REQUEST", + "safeName": "GET_UNDISCRIMINATED_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetUndiscriminatedOptionsRequest", + "safeName": "GetUndiscriminatedOptionsRequest" + } + }, + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "dryRun", + "camelCase": { + "unsafeName": "dryRun", + "safeName": "dryRun" + }, + "snakeCase": { + "unsafeName": "dry_run", + "safeName": "dry_run" + }, + "screamingSnakeCase": { + "unsafeName": "DRY_RUN", + "safeName": "DRY_RUN" + }, + "pascalCase": { + "unsafeName": "DryRun", + "safeName": "DryRun" + } + }, + "wireValue": "dryRun" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ] + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "GetUndiscriminatedOptionsRequest", + "camelCase": { + "unsafeName": "getUndiscriminatedOptionsRequest", + "safeName": "getUndiscriminatedOptionsRequest" + }, + "snakeCase": { + "unsafeName": "get_undiscriminated_options_request", + "safeName": "get_undiscriminated_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_UNDISCRIMINATED_OPTIONS_REQUEST", + "safeName": "GET_UNDISCRIMINATED_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetUndiscriminatedOptionsRequest", + "safeName": "GetUndiscriminatedOptionsRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" } } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } } - ] + }, + "response": { + "value": { + "type": "response", + "responseBodyType": { + "type": "named", + "name": { + "originalName": "UndiscriminatedOptions", + "camelCase": { + "unsafeName": "undiscriminatedOptions", + "safeName": "undiscriminatedOptions" + }, + "snakeCase": { + "unsafeName": "undiscriminated_options", + "safeName": "undiscriminated_options" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_OPTIONS", + "safeName": "UNDISCRIMINATED_OPTIONS" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedOptions", + "safeName": "UndiscriminatedOptions" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "typeId": "type_literal:UndiscriminatedOptions" + } + }, + "type": "json" + }, + "errors": [], + "examples": [] } ] }, @@ -3841,6 +5138,11 @@ "variables": [], "serviceTypeReferenceInfo": { "typesReferencedOnlyByService": { + "service_literal": [ + "type_literal:Options", + "type_literal:UndiscriminatedOptions", + "type_literal:CreateOptionsResponse" + ], "service_reference": [ "type_reference:SendRequest" ] @@ -3992,6 +5294,80 @@ "subpackages": [], "hasEndpointsInTree": true }, + "subpackage_literal": { + "name": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + }, + "websocket": null, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "service": "service_literal", + "types": [ + "type_literal:Options", + "type_literal:UndiscriminatedOptions", + "type_literal:CreateOptionsResponse" + ], + "errors": [], + "subpackages": [], + "hasEndpointsInTree": true + }, "subpackage_path": { "name": { "originalName": "path", @@ -4218,6 +5594,7 @@ "subpackages": [ "subpackage_headers", "subpackage_inlined", + "subpackage_literal", "subpackage_path", "subpackage_query", "subpackage_reference" diff --git a/seed/csharp-model/multi-url-environment/ir.json b/seed/csharp-model/multi-url-environment/ir.json index 36dd78936a0..7d3e30331ca 100644 --- a/seed/csharp-model/multi-url-environment/ir.json +++ b/seed/csharp-model/multi-url-environment/ir.json @@ -621,6 +621,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_ec2": { "name": { @@ -642,6 +643,7 @@ "safeName": "Ec2" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -711,6 +713,7 @@ "safeName": "S3" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -766,6 +769,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/no-environment/ir.json b/seed/csharp-model/no-environment/ir.json index 0de013b071f..772ff090b77 100644 --- a/seed/csharp-model/no-environment/ir.json +++ b/seed/csharp-model/no-environment/ir.json @@ -189,6 +189,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_dummy": { "name": { @@ -210,6 +211,7 @@ "safeName": "Dummy" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -265,6 +267,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/object/ir.json b/seed/csharp-model/object/ir.json index d789120247d..4bd1c4ebb2b 100644 --- a/seed/csharp-model/object/ir.json +++ b/seed/csharp-model/object/ir.json @@ -2636,12 +2636,14 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": {}, "rootPackage": { "fernFilepath": { "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:Type", "type_:Name" diff --git a/seed/csharp-model/objects-with-imports/ir.json b/seed/csharp-model/objects-with-imports/ir.json index 065ac27222a..bc5a2975807 100644 --- a/seed/csharp-model/objects-with-imports/ir.json +++ b/seed/csharp-model/objects-with-imports/ir.json @@ -7504,6 +7504,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_commons": { "name": { @@ -7525,6 +7526,7 @@ "safeName": "Commons" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -7596,6 +7598,7 @@ "safeName": "Metadata" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -7705,6 +7708,7 @@ "safeName": "File" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -7778,6 +7782,7 @@ "safeName": "Directory" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -7873,6 +7878,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:Node", "type_:Tree" diff --git a/seed/csharp-model/optional/ir.json b/seed/csharp-model/optional/ir.json index c8781d0db2e..02c0430890f 100644 --- a/seed/csharp-model/optional/ir.json +++ b/seed/csharp-model/optional/ir.json @@ -235,6 +235,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_optional": { "name": { @@ -256,6 +257,7 @@ "safeName": "Optional" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -311,6 +313,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/package-yml/ir.json b/seed/csharp-model/package-yml/ir.json index db24c96c2e5..fec55d13865 100644 --- a/seed/csharp-model/package-yml/ir.json +++ b/seed/csharp-model/package-yml/ir.json @@ -574,6 +574,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -595,6 +596,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -650,6 +652,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "service": "service_", "types": [], "errors": [], diff --git a/seed/csharp-model/plain-text/ir.json b/seed/csharp-model/plain-text/ir.json index 54a86927deb..ec080b68260 100644 --- a/seed/csharp-model/plain-text/ir.json +++ b/seed/csharp-model/plain-text/ir.json @@ -159,6 +159,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -180,6 +181,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -235,6 +237,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/query-parameters/ir.json b/seed/csharp-model/query-parameters/ir.json index 36743526455..d28bee23c51 100644 --- a/seed/csharp-model/query-parameters/ir.json +++ b/seed/csharp-model/query-parameters/ir.json @@ -1148,6 +1148,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_user": { "name": { @@ -1169,6 +1170,7 @@ "safeName": "User" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1227,6 +1229,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/reserved-keywords/ir.json b/seed/csharp-model/reserved-keywords/ir.json index c73a1c275a0..b48d379be8f 100644 --- a/seed/csharp-model/reserved-keywords/ir.json +++ b/seed/csharp-model/reserved-keywords/ir.json @@ -540,6 +540,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_package": { "name": { @@ -561,6 +562,7 @@ "safeName": "Package" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -619,6 +621,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/response-property/ir.json b/seed/csharp-model/response-property/ir.json index 15aa7ea95d4..8ee0529ce5c 100644 --- a/seed/csharp-model/response-property/ir.json +++ b/seed/csharp-model/response-property/ir.json @@ -2374,6 +2374,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -2395,6 +2396,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2455,6 +2457,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:StringResponse", "type_:OptionalStringResponse", diff --git a/seed/csharp-model/single-url-environment-default/ir.json b/seed/csharp-model/single-url-environment-default/ir.json index 1fa0ffb938b..41828252cc5 100644 --- a/seed/csharp-model/single-url-environment-default/ir.json +++ b/seed/csharp-model/single-url-environment-default/ir.json @@ -243,6 +243,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_dummy": { "name": { @@ -264,6 +265,7 @@ "safeName": "Dummy" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -319,6 +321,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/single-url-environment-no-default/ir.json b/seed/csharp-model/single-url-environment-no-default/ir.json index 1f211f0422f..7d7284bcb0c 100644 --- a/seed/csharp-model/single-url-environment-no-default/ir.json +++ b/seed/csharp-model/single-url-environment-no-default/ir.json @@ -242,6 +242,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_dummy": { "name": { @@ -263,6 +264,7 @@ "safeName": "Dummy" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -318,6 +320,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/streaming/ir.json b/seed/csharp-model/streaming/ir.json index 08724880951..805bc52dcec 100644 --- a/seed/csharp-model/streaming/ir.json +++ b/seed/csharp-model/streaming/ir.json @@ -485,6 +485,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_dummy": { "name": { @@ -506,6 +507,7 @@ "safeName": "Dummy" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -563,6 +565,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/trace/ir.json b/seed/csharp-model/trace/ir.json index e4e90c0014e..9a8f135eab0 100644 --- a/seed/csharp-model/trace/ir.json +++ b/seed/csharp-model/trace/ir.json @@ -81219,6 +81219,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_v2": { "name": { @@ -81240,6 +81241,7 @@ "safeName": "V2" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81313,6 +81315,7 @@ "safeName": "Admin" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81384,6 +81387,7 @@ "safeName": "Commons" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81479,6 +81483,7 @@ "safeName": "Homepage" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81548,6 +81553,7 @@ "safeName": "LangServer" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81619,6 +81625,7 @@ "safeName": "Migration" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81691,6 +81698,7 @@ "safeName": "Playlist" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81770,6 +81778,7 @@ "safeName": "Problem" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81851,6 +81860,7 @@ "safeName": "Submission" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82002,6 +82012,7 @@ "safeName": "Sysprop" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82071,6 +82082,7 @@ "safeName": "Problem" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82221,6 +82233,7 @@ "safeName": "V3" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82330,6 +82343,7 @@ "safeName": "Problem" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82504,6 +82518,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/undiscriminated-unions/ir.json b/seed/csharp-model/undiscriminated-unions/ir.json index 0dde13b5dc6..65641e9c666 100644 --- a/seed/csharp-model/undiscriminated-unions/ir.json +++ b/seed/csharp-model/undiscriminated-unions/ir.json @@ -524,6 +524,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_union": { "name": { @@ -545,6 +546,7 @@ "safeName": "Union" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -602,6 +604,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/unknown/ir.json b/seed/csharp-model/unknown/ir.json index 337a487bb5d..e3a3dd31e24 100644 --- a/seed/csharp-model/unknown/ir.json +++ b/seed/csharp-model/unknown/ir.json @@ -391,6 +391,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_unknown": { "name": { @@ -412,6 +413,7 @@ "safeName": "Unknown" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -470,6 +472,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-model/variables/ir.json b/seed/csharp-model/variables/ir.json index 9de892aad8f..706e82281d4 100644 --- a/seed/csharp-model/variables/ir.json +++ b/seed/csharp-model/variables/ir.json @@ -249,6 +249,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -270,6 +271,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -325,6 +327,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/alias/ir.json b/seed/csharp-sdk/alias/ir.json index b6aaef92bcf..2c3b07b4ad6 100644 --- a/seed/csharp-sdk/alias/ir.json +++ b/seed/csharp-sdk/alias/ir.json @@ -771,12 +771,14 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": {}, "rootPackage": { "fernFilepath": { "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:TypeId", "type_:Type", diff --git a/seed/csharp-sdk/api-wide-base-path/ir.json b/seed/csharp-sdk/api-wide-base-path/ir.json index 406443ff02b..4cf34b4aff5 100644 --- a/seed/csharp-sdk/api-wide-base-path/ir.json +++ b/seed/csharp-sdk/api-wide-base-path/ir.json @@ -348,6 +348,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -369,6 +370,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -424,6 +426,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/audiences/ir.json b/seed/csharp-sdk/audiences/ir.json index 6d37fb33aa7..c68ef145fd6 100644 --- a/seed/csharp-sdk/audiences/ir.json +++ b/seed/csharp-sdk/audiences/ir.json @@ -1848,6 +1848,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_commons": { "name": { @@ -1869,6 +1870,7 @@ "safeName": "Commons" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1939,6 +1941,7 @@ "safeName": "FolderA" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2010,6 +2013,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2120,6 +2124,7 @@ "safeName": "FolderB" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2191,6 +2196,7 @@ "safeName": "Common" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2300,6 +2306,7 @@ "safeName": "FolderC" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2371,6 +2378,7 @@ "safeName": "Common" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2480,6 +2488,7 @@ "safeName": "Foo" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2539,6 +2548,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/auth-environment-variables/ir.json b/seed/csharp-sdk/auth-environment-variables/ir.json index 1c991c67e90..fe90e23b12c 100644 --- a/seed/csharp-sdk/auth-environment-variables/ir.json +++ b/seed/csharp-sdk/auth-environment-variables/ir.json @@ -198,6 +198,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -219,6 +220,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -274,6 +276,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/basic-auth/ir.json b/seed/csharp-sdk/basic-auth/ir.json index 640dee5a59b..5f44dcbc08e 100644 --- a/seed/csharp-sdk/basic-auth/ir.json +++ b/seed/csharp-sdk/basic-auth/ir.json @@ -851,6 +851,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_basic-auth": { "name": { @@ -872,6 +873,7 @@ "safeName": "BasicAuth" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -941,6 +943,7 @@ "safeName": "Errors" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1000,6 +1003,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/bearer-token-environment-variable/ir.json b/seed/csharp-sdk/bearer-token-environment-variable/ir.json index 435aade9e4e..e23a0611120 100644 --- a/seed/csharp-sdk/bearer-token-environment-variable/ir.json +++ b/seed/csharp-sdk/bearer-token-environment-variable/ir.json @@ -191,6 +191,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -212,6 +213,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -267,6 +269,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/bytes/ir.json b/seed/csharp-sdk/bytes/ir.json index 810abdac1e2..94d20683c5e 100644 --- a/seed/csharp-sdk/bytes/ir.json +++ b/seed/csharp-sdk/bytes/ir.json @@ -189,6 +189,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -210,6 +211,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -265,6 +267,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/circular-references/ir.json b/seed/csharp-sdk/circular-references/ir.json index 05a7ff0f868..4648c3c16cf 100644 --- a/seed/csharp-sdk/circular-references/ir.json +++ b/seed/csharp-sdk/circular-references/ir.json @@ -1321,6 +1321,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_a": { "name": { @@ -1342,6 +1343,7 @@ "safeName": "A" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1412,6 +1414,7 @@ "safeName": "Ast" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1471,6 +1474,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:ImportingA", "type_:RootType" diff --git a/seed/csharp-sdk/custom-auth/ir.json b/seed/csharp-sdk/custom-auth/ir.json index a64ac5ae4bf..13f8cdb539c 100644 --- a/seed/csharp-sdk/custom-auth/ir.json +++ b/seed/csharp-sdk/custom-auth/ir.json @@ -839,6 +839,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_custom-auth": { "name": { @@ -860,6 +861,7 @@ "safeName": "CustomAuth" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -929,6 +931,7 @@ "safeName": "Errors" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -988,6 +991,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/error-property/ir.json b/seed/csharp-sdk/error-property/ir.json index 0561bfd10b5..864903cfccf 100644 --- a/seed/csharp-sdk/error-property/ir.json +++ b/seed/csharp-sdk/error-property/ir.json @@ -542,6 +542,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_errors": { "name": { @@ -563,6 +564,7 @@ "safeName": "Errors" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -635,6 +637,7 @@ "safeName": "PropertyBasedError" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -690,6 +693,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/exhaustive/ir.json b/seed/csharp-sdk/exhaustive/ir.json index c17958c268c..f26125f03f8 100644 --- a/seed/csharp-sdk/exhaustive/ir.json +++ b/seed/csharp-sdk/exhaustive/ir.json @@ -13787,6 +13787,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_endpoints": { "name": { @@ -13808,6 +13809,7 @@ "safeName": "Endpoints" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -13885,6 +13887,7 @@ "safeName": "Container" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -13993,6 +13996,7 @@ "safeName": "Enum" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14101,6 +14105,7 @@ "safeName": "HttpMethods" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14209,6 +14214,7 @@ "safeName": "Object" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14317,6 +14323,7 @@ "safeName": "Params" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14425,6 +14432,7 @@ "safeName": "Primitive" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14533,6 +14541,7 @@ "safeName": "Union" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14641,6 +14650,7 @@ "safeName": "GeneralErrors" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14713,6 +14723,7 @@ "safeName": "InlinedRequests" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14782,6 +14793,7 @@ "safeName": "NoAuth" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14851,6 +14863,7 @@ "safeName": "NoReqBody" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14920,6 +14933,7 @@ "safeName": "ReqWithHeaders" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -14989,6 +15003,7 @@ "safeName": "Types" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -15062,6 +15077,7 @@ "safeName": "Enum" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -15173,6 +15189,7 @@ "safeName": "Object" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -15291,6 +15308,7 @@ "safeName": "Union" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -15390,6 +15408,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/extends/ir.json b/seed/csharp-sdk/extends/ir.json index c91925c42cc..8543b185e4e 100644 --- a/seed/csharp-sdk/extends/ir.json +++ b/seed/csharp-sdk/extends/ir.json @@ -1024,12 +1024,14 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": {}, "rootPackage": { "fernFilepath": { "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:ExampleType", "type_:NestedType", diff --git a/seed/csharp-sdk/file-download/ir.json b/seed/csharp-sdk/file-download/ir.json index 4ba988ba128..b874ee3ff04 100644 --- a/seed/csharp-sdk/file-download/ir.json +++ b/seed/csharp-sdk/file-download/ir.json @@ -159,6 +159,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -180,6 +181,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -235,6 +237,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/file-upload/ir.json b/seed/csharp-sdk/file-upload/ir.json index 71702d8f2d7..94dc9d97607 100644 --- a/seed/csharp-sdk/file-upload/ir.json +++ b/seed/csharp-sdk/file-upload/ir.json @@ -1862,6 +1862,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -1883,6 +1884,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1942,6 +1944,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/folders/ir.json b/seed/csharp-sdk/folders/ir.json index 4563d0ade70..34477661e78 100644 --- a/seed/csharp-sdk/folders/ir.json +++ b/seed/csharp-sdk/folders/ir.json @@ -1087,6 +1087,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_a": { "name": { @@ -1108,6 +1109,7 @@ "safeName": "A" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1181,6 +1183,7 @@ "safeName": "B" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1289,6 +1292,7 @@ "safeName": "C" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1397,6 +1401,7 @@ "safeName": "Folder" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1469,6 +1474,7 @@ "safeName": "D" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1578,6 +1584,7 @@ "safeName": "Types" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1725,6 +1732,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1821,6 +1829,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "service": "service_", "types": [], "errors": [], diff --git a/seed/csharp-sdk/idempotency-headers/ir.json b/seed/csharp-sdk/idempotency-headers/ir.json index 399b9284e98..305c5e91ca4 100644 --- a/seed/csharp-sdk/idempotency-headers/ir.json +++ b/seed/csharp-sdk/idempotency-headers/ir.json @@ -681,6 +681,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_payment": { "name": { @@ -702,6 +703,7 @@ "safeName": "Payment" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -759,6 +761,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/imdb/ir.json b/seed/csharp-sdk/imdb/ir.json index 35e97880313..4848df47c5f 100644 --- a/seed/csharp-sdk/imdb/ir.json +++ b/seed/csharp-sdk/imdb/ir.json @@ -1378,6 +1378,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_imdb": { "name": { @@ -1399,6 +1400,7 @@ "safeName": "Imdb" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1460,6 +1462,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/literal-headers/ir.json b/seed/csharp-sdk/literal-headers/ir.json new file mode 100644 index 00000000000..3e8b2d4ea36 --- /dev/null +++ b/seed/csharp-sdk/literal-headers/ir.json @@ -0,0 +1,1394 @@ +{ + "apiName": { + "originalName": "literal-headers", + "camelCase": { + "unsafeName": "literalHeaders", + "safeName": "literalHeaders" + }, + "snakeCase": { + "unsafeName": "literal_headers", + "safeName": "literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_HEADERS", + "safeName": "LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "LiteralHeaders", + "safeName": "LiteralHeaders" + } + }, + "auth": { + "requirement": "ALL", + "schemes": [] + }, + "headers": [ + { + "name": { + "name": { + "originalName": "apiHeader", + "camelCase": { + "unsafeName": "apiHeader", + "safeName": "apiHeader" + }, + "snakeCase": { + "unsafeName": "api_header", + "safeName": "api_header" + }, + "screamingSnakeCase": { + "unsafeName": "API_HEADER", + "safeName": "API_HEADER" + }, + "pascalCase": { + "unsafeName": "ApiHeader", + "safeName": "ApiHeader" + } + }, + "wireValue": "X-API-Header" + }, + "valueType": { + "container": { + "literal": { + "string": "api header value", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "apiTest", + "camelCase": { + "unsafeName": "apiTest", + "safeName": "apiTest" + }, + "snakeCase": { + "unsafeName": "api_test", + "safeName": "api_test" + }, + "screamingSnakeCase": { + "unsafeName": "API_TEST", + "safeName": "API_TEST" + }, + "pascalCase": { + "unsafeName": "ApiTest", + "safeName": "ApiTest" + } + }, + "wireValue": "X-API-Test" + }, + "valueType": { + "container": { + "literal": { + "boolean": false, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "idempotencyHeaders": [], + "types": {}, + "errors": {}, + "services": { + "service_no-headers": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + } + } + }, + "basePath": { + "head": "/no-headers", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_no-headers.get", + "name": { + "originalName": "get", + "camelCase": { + "unsafeName": "get", + "safeName": "get" + }, + "snakeCase": { + "unsafeName": "get", + "safeName": "get" + }, + "screamingSnakeCase": { + "unsafeName": "GET", + "safeName": "GET" + }, + "pascalCase": { + "unsafeName": "Get", + "safeName": "Get" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "", + "parts": [] + }, + "fullPath": { + "head": "/no-headers", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "errors": [], + "examples": [] + } + ] + }, + "service_only-literal-headers": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + } + } + }, + "basePath": { + "head": "/only-literal-headers", + "parts": [] + }, + "headers": [ + { + "name": { + "name": { + "originalName": "literalServiceHeader", + "camelCase": { + "unsafeName": "literalServiceHeader", + "safeName": "literalServiceHeader" + }, + "snakeCase": { + "unsafeName": "literal_service_header", + "safeName": "literal_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_SERVICE_HEADER", + "safeName": "LITERAL_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralServiceHeader", + "safeName": "LiteralServiceHeader" + } + }, + "wireValue": "literalServiceHeader" + }, + "valueType": { + "container": { + "literal": { + "string": "service header", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_only-literal-headers.get", + "name": { + "originalName": "get", + "camelCase": { + "unsafeName": "get", + "safeName": "get" + }, + "snakeCase": { + "unsafeName": "get", + "safeName": "get" + }, + "screamingSnakeCase": { + "unsafeName": "GET", + "safeName": "GET" + }, + "pascalCase": { + "unsafeName": "Get", + "safeName": "Get" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "", + "parts": [] + }, + "fullPath": { + "head": "/only-literal-headers", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [ + { + "name": { + "name": { + "originalName": "literalEndpointHeader", + "camelCase": { + "unsafeName": "literalEndpointHeader", + "safeName": "literalEndpointHeader" + }, + "snakeCase": { + "unsafeName": "literal_endpoint_header", + "safeName": "literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_ENDPOINT_HEADER", + "safeName": "LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralEndpointHeader", + "safeName": "LiteralEndpointHeader" + } + }, + "wireValue": "literalEndpointHeader" + }, + "valueType": { + "container": { + "literal": { + "string": "endpoint header", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "falseEndpointHeader", + "camelCase": { + "unsafeName": "falseEndpointHeader", + "safeName": "falseEndpointHeader" + }, + "snakeCase": { + "unsafeName": "false_endpoint_header", + "safeName": "false_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "FALSE_ENDPOINT_HEADER", + "safeName": "FALSE_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "FalseEndpointHeader", + "safeName": "FalseEndpointHeader" + } + }, + "wireValue": "falseEndpointHeader" + }, + "valueType": { + "container": { + "literal": { + "boolean": false, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "errors": [], + "examples": [ + { + "url": "/only-literal-headers", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [ + { + "name": { + "name": { + "originalName": "literalEndpointHeader", + "camelCase": { + "unsafeName": "literalEndpointHeader", + "safeName": "literalEndpointHeader" + }, + "snakeCase": { + "unsafeName": "literal_endpoint_header", + "safeName": "literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_ENDPOINT_HEADER", + "safeName": "LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralEndpointHeader", + "safeName": "LiteralEndpointHeader" + } + }, + "wireValue": "literalEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "endpoint header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "endpoint header" + } + }, + { + "name": { + "name": { + "originalName": "falseEndpointHeader", + "camelCase": { + "unsafeName": "falseEndpointHeader", + "safeName": "falseEndpointHeader" + }, + "snakeCase": { + "unsafeName": "false_endpoint_header", + "safeName": "false_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "FALSE_ENDPOINT_HEADER", + "safeName": "FALSE_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "FalseEndpointHeader", + "safeName": "FalseEndpointHeader" + } + }, + "wireValue": "falseEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "boolean": false, + "type": "boolean" + }, + "type": "primitive" + }, + "jsonExample": false + } + } + ], + "serviceHeaders": [ + { + "name": { + "name": { + "originalName": "literalServiceHeader", + "camelCase": { + "unsafeName": "literalServiceHeader", + "safeName": "literalServiceHeader" + }, + "snakeCase": { + "unsafeName": "literal_service_header", + "safeName": "literal_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_SERVICE_HEADER", + "safeName": "LITERAL_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralServiceHeader", + "safeName": "LiteralServiceHeader" + } + }, + "wireValue": "literalServiceHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "service header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "service header" + } + } + ], + "queryParameters": [], + "response": { + "type": "ok" + } + } + ] + } + ] + }, + "service_with-non-literal-headers": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + } + } + }, + "basePath": { + "head": "/with-non-literal-headers", + "parts": [] + }, + "headers": [ + { + "name": { + "name": { + "originalName": "integer", + "camelCase": { + "unsafeName": "integer", + "safeName": "integer" + }, + "snakeCase": { + "unsafeName": "integer", + "safeName": "integer" + }, + "screamingSnakeCase": { + "unsafeName": "INTEGER", + "safeName": "INTEGER" + }, + "pascalCase": { + "unsafeName": "Integer", + "safeName": "Integer" + } + }, + "wireValue": "integer" + }, + "valueType": { + "primitive": "INTEGER", + "type": "primitive" + } + }, + { + "name": { + "name": { + "originalName": "maybeInteger", + "camelCase": { + "unsafeName": "maybeInteger", + "safeName": "maybeInteger" + }, + "snakeCase": { + "unsafeName": "maybe_integer", + "safeName": "maybe_integer" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_INTEGER", + "safeName": "MAYBE_INTEGER" + }, + "pascalCase": { + "unsafeName": "MaybeInteger", + "safeName": "MaybeInteger" + } + }, + "wireValue": "maybeInteger" + }, + "valueType": { + "container": { + "optional": { + "primitive": "INTEGER", + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "literalServiceHeader", + "camelCase": { + "unsafeName": "literalServiceHeader", + "safeName": "literalServiceHeader" + }, + "snakeCase": { + "unsafeName": "literal_service_header", + "safeName": "literal_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_SERVICE_HEADER", + "safeName": "LITERAL_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralServiceHeader", + "safeName": "LiteralServiceHeader" + } + }, + "wireValue": "literalServiceHeader" + }, + "valueType": { + "container": { + "literal": { + "string": "service header", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "trueServiceHeader", + "camelCase": { + "unsafeName": "trueServiceHeader", + "safeName": "trueServiceHeader" + }, + "snakeCase": { + "unsafeName": "true_service_header", + "safeName": "true_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "TRUE_SERVICE_HEADER", + "safeName": "TRUE_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "TrueServiceHeader", + "safeName": "TrueServiceHeader" + } + }, + "wireValue": "trueServiceHeader" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_with-non-literal-headers.get", + "name": { + "originalName": "get", + "camelCase": { + "unsafeName": "get", + "safeName": "get" + }, + "snakeCase": { + "unsafeName": "get", + "safeName": "get" + }, + "screamingSnakeCase": { + "unsafeName": "GET", + "safeName": "GET" + }, + "pascalCase": { + "unsafeName": "Get", + "safeName": "Get" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "", + "parts": [] + }, + "fullPath": { + "head": "/with-non-literal-headers", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [ + { + "name": { + "name": { + "originalName": "nonLiteralEndpointHeader", + "camelCase": { + "unsafeName": "nonLiteralEndpointHeader", + "safeName": "nonLiteralEndpointHeader" + }, + "snakeCase": { + "unsafeName": "non_literal_endpoint_header", + "safeName": "non_literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "NON_LITERAL_ENDPOINT_HEADER", + "safeName": "NON_LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "NonLiteralEndpointHeader", + "safeName": "NonLiteralEndpointHeader" + } + }, + "wireValue": "nonLiteralEndpointHeader" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + { + "name": { + "name": { + "originalName": "literalEndpointHeader", + "camelCase": { + "unsafeName": "literalEndpointHeader", + "safeName": "literalEndpointHeader" + }, + "snakeCase": { + "unsafeName": "literal_endpoint_header", + "safeName": "literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_ENDPOINT_HEADER", + "safeName": "LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralEndpointHeader", + "safeName": "LiteralEndpointHeader" + } + }, + "wireValue": "literalEndpointHeader" + }, + "valueType": { + "container": { + "literal": { + "string": "endpoint header", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "trueEndpointHeader", + "camelCase": { + "unsafeName": "trueEndpointHeader", + "safeName": "trueEndpointHeader" + }, + "snakeCase": { + "unsafeName": "true_endpoint_header", + "safeName": "true_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "TRUE_ENDPOINT_HEADER", + "safeName": "TRUE_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "TrueEndpointHeader", + "safeName": "TrueEndpointHeader" + } + }, + "wireValue": "trueEndpointHeader" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "WithNonLiteralHeadersRequest", + "camelCase": { + "unsafeName": "withNonLiteralHeadersRequest", + "safeName": "withNonLiteralHeadersRequest" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers_request", + "safeName": "with_non_literal_headers_request" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS_REQUEST", + "safeName": "WITH_NON_LITERAL_HEADERS_REQUEST" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeadersRequest", + "safeName": "WithNonLiteralHeadersRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + } + }, + "errors": [], + "examples": [ + { + "url": "/with-non-literal-headers", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [ + { + "name": { + "name": { + "originalName": "nonLiteralEndpointHeader", + "camelCase": { + "unsafeName": "nonLiteralEndpointHeader", + "safeName": "nonLiteralEndpointHeader" + }, + "snakeCase": { + "unsafeName": "non_literal_endpoint_header", + "safeName": "non_literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "NON_LITERAL_ENDPOINT_HEADER", + "safeName": "NON_LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "NonLiteralEndpointHeader", + "safeName": "NonLiteralEndpointHeader" + } + }, + "wireValue": "nonLiteralEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "custom header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "custom header" + } + }, + { + "name": { + "name": { + "originalName": "literalEndpointHeader", + "camelCase": { + "unsafeName": "literalEndpointHeader", + "safeName": "literalEndpointHeader" + }, + "snakeCase": { + "unsafeName": "literal_endpoint_header", + "safeName": "literal_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_ENDPOINT_HEADER", + "safeName": "LITERAL_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralEndpointHeader", + "safeName": "LiteralEndpointHeader" + } + }, + "wireValue": "literalEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "endpoint header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "endpoint header" + } + }, + { + "name": { + "name": { + "originalName": "trueEndpointHeader", + "camelCase": { + "unsafeName": "trueEndpointHeader", + "safeName": "trueEndpointHeader" + }, + "snakeCase": { + "unsafeName": "true_endpoint_header", + "safeName": "true_endpoint_header" + }, + "screamingSnakeCase": { + "unsafeName": "TRUE_ENDPOINT_HEADER", + "safeName": "TRUE_ENDPOINT_HEADER" + }, + "pascalCase": { + "unsafeName": "TrueEndpointHeader", + "safeName": "TrueEndpointHeader" + } + }, + "wireValue": "trueEndpointHeader" + }, + "value": { + "shape": { + "primitive": { + "boolean": true, + "type": "boolean" + }, + "type": "primitive" + }, + "jsonExample": true + } + } + ], + "serviceHeaders": [ + { + "name": { + "name": { + "originalName": "integer", + "camelCase": { + "unsafeName": "integer", + "safeName": "integer" + }, + "snakeCase": { + "unsafeName": "integer", + "safeName": "integer" + }, + "screamingSnakeCase": { + "unsafeName": "INTEGER", + "safeName": "INTEGER" + }, + "pascalCase": { + "unsafeName": "Integer", + "safeName": "Integer" + } + }, + "wireValue": "integer" + }, + "value": { + "shape": { + "primitive": { + "integer": 42, + "type": "integer" + }, + "type": "primitive" + }, + "jsonExample": 42 + } + }, + { + "name": { + "name": { + "originalName": "literalServiceHeader", + "camelCase": { + "unsafeName": "literalServiceHeader", + "safeName": "literalServiceHeader" + }, + "snakeCase": { + "unsafeName": "literal_service_header", + "safeName": "literal_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL_SERVICE_HEADER", + "safeName": "LITERAL_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "LiteralServiceHeader", + "safeName": "LiteralServiceHeader" + } + }, + "wireValue": "literalServiceHeader" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "service header" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "service header" + } + }, + { + "name": { + "name": { + "originalName": "trueServiceHeader", + "camelCase": { + "unsafeName": "trueServiceHeader", + "safeName": "trueServiceHeader" + }, + "snakeCase": { + "unsafeName": "true_service_header", + "safeName": "true_service_header" + }, + "screamingSnakeCase": { + "unsafeName": "TRUE_SERVICE_HEADER", + "safeName": "TRUE_SERVICE_HEADER" + }, + "pascalCase": { + "unsafeName": "TrueServiceHeader", + "safeName": "TrueServiceHeader" + } + }, + "wireValue": "trueServiceHeader" + }, + "value": { + "shape": { + "primitive": { + "boolean": true, + "type": "boolean" + }, + "type": "primitive" + }, + "jsonExample": true + } + } + ], + "queryParameters": [], + "response": { + "type": "ok" + } + } + ] + } + ] + } + }, + "constants": { + "errorInstanceIdKey": { + "name": { + "originalName": "errorInstanceId", + "camelCase": { + "unsafeName": "errorInstanceId", + "safeName": "errorInstanceId" + }, + "snakeCase": { + "unsafeName": "error_instance_id", + "safeName": "error_instance_id" + }, + "screamingSnakeCase": { + "unsafeName": "ERROR_INSTANCE_ID", + "safeName": "ERROR_INSTANCE_ID" + }, + "pascalCase": { + "unsafeName": "ErrorInstanceId", + "safeName": "ErrorInstanceId" + } + }, + "wireValue": "errorInstanceId" + } + }, + "errorDiscriminationStrategy": { + "type": "statusCode" + }, + "pathParameters": [], + "variables": [], + "serviceTypeReferenceInfo": { + "typesReferencedOnlyByService": {}, + "sharedTypes": [] + }, + "webhookGroups": {}, + "websocketChannels": {}, + "subpackages": { + "subpackage_no-headers": { + "name": { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + }, + "websocket": null, + "fernFilepath": { + "allParts": [ + { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "no-headers", + "camelCase": { + "unsafeName": "noHeaders", + "safeName": "noHeaders" + }, + "snakeCase": { + "unsafeName": "no_headers", + "safeName": "no_headers" + }, + "screamingSnakeCase": { + "unsafeName": "NO_HEADERS", + "safeName": "NO_HEADERS" + }, + "pascalCase": { + "unsafeName": "NoHeaders", + "safeName": "NoHeaders" + } + } + }, + "service": "service_no-headers", + "types": [], + "errors": [], + "subpackages": [], + "hasEndpointsInTree": true + }, + "subpackage_only-literal-headers": { + "name": { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + }, + "websocket": null, + "fernFilepath": { + "allParts": [ + { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "only-literal-headers", + "camelCase": { + "unsafeName": "onlyLiteralHeaders", + "safeName": "onlyLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "only_literal_headers", + "safeName": "only_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ONLY_LITERAL_HEADERS", + "safeName": "ONLY_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "OnlyLiteralHeaders", + "safeName": "OnlyLiteralHeaders" + } + } + }, + "service": "service_only-literal-headers", + "types": [], + "errors": [], + "subpackages": [], + "hasEndpointsInTree": true + }, + "subpackage_with-non-literal-headers": { + "name": { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + }, + "websocket": null, + "fernFilepath": { + "allParts": [ + { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + } + ], + "packagePath": [], + "file": { + "originalName": "with-non-literal-headers", + "camelCase": { + "unsafeName": "withNonLiteralHeaders", + "safeName": "withNonLiteralHeaders" + }, + "snakeCase": { + "unsafeName": "with_non_literal_headers", + "safeName": "with_non_literal_headers" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_NON_LITERAL_HEADERS", + "safeName": "WITH_NON_LITERAL_HEADERS" + }, + "pascalCase": { + "unsafeName": "WithNonLiteralHeaders", + "safeName": "WithNonLiteralHeaders" + } + } + }, + "service": "service_with-non-literal-headers", + "types": [], + "errors": [], + "subpackages": [], + "hasEndpointsInTree": true + } + }, + "rootPackage": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "websocket": null, + "types": [], + "errors": [], + "subpackages": [ + "subpackage_no-headers", + "subpackage_only-literal-headers", + "subpackage_with-non-literal-headers" + ], + "hasEndpointsInTree": true + }, + "sdkConfig": { + "isAuthMandatory": false, + "hasStreamingEndpoints": false, + "hasFileDownloadEndpoints": false, + "platformHeaders": { + "language": "X-Fern-Language", + "sdkName": "X-Fern-SDK-Name", + "sdkVersion": "X-Fern-SDK-Version" + } + } +} \ No newline at end of file diff --git a/seed/csharp-sdk/literal-headers/snippet.json b/seed/csharp-sdk/literal-headers/snippet.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/csharp-sdk/literal/ir.json b/seed/csharp-sdk/literal/ir.json index 6de6e8cae0c..3611944ef58 100644 --- a/seed/csharp-sdk/literal/ir.json +++ b/seed/csharp-sdk/literal/ir.json @@ -221,71 +221,71 @@ "referencedTypes": {}, "examples": [] }, - "type_reference:SendRequest": { + "type_literal:Options": { "name": { "name": { - "originalName": "SendRequest", + "originalName": "Options", "camelCase": { - "unsafeName": "sendRequest", - "safeName": "sendRequest" + "unsafeName": "options", + "safeName": "options" }, "snakeCase": { - "unsafeName": "send_request", - "safeName": "send_request" + "unsafeName": "options", + "safeName": "options" }, "screamingSnakeCase": { - "unsafeName": "SEND_REQUEST", - "safeName": "SEND_REQUEST" + "unsafeName": "OPTIONS", + "safeName": "OPTIONS" }, "pascalCase": { - "unsafeName": "SendRequest", - "safeName": "SendRequest" + "unsafeName": "Options", + "safeName": "Options" } }, "fernFilepath": { "allParts": [ { - "originalName": "reference", + "originalName": "literal", "camelCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "REFERENCE", - "safeName": "REFERENCE" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Reference", - "safeName": "Reference" + "unsafeName": "Literal", + "safeName": "Literal" } } ], "packagePath": [], "file": { - "originalName": "reference", + "originalName": "literal", "camelCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "REFERENCE", - "safeName": "REFERENCE" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Reference", - "safeName": "Reference" + "unsafeName": "Literal", + "safeName": "Literal" } } }, - "typeId": "type_reference:SendRequest" + "typeId": "type_literal:Options" }, "shape": { "type": "object", @@ -294,30 +294,30 @@ { "name": { "name": { - "originalName": "prompt", + "originalName": "id", "camelCase": { - "unsafeName": "prompt", - "safeName": "prompt" + "unsafeName": "id", + "safeName": "id" }, "snakeCase": { - "unsafeName": "prompt", - "safeName": "prompt" + "unsafeName": "id", + "safeName": "id" }, "screamingSnakeCase": { - "unsafeName": "PROMPT", - "safeName": "PROMPT" + "unsafeName": "ID", + "safeName": "ID" }, "pascalCase": { - "unsafeName": "Prompt", - "safeName": "Prompt" + "unsafeName": "Id", + "safeName": "Id" } }, - "wireValue": "prompt" + "wireValue": "id" }, "valueType": { "container": { "literal": { - "string": "You are a helpful assistant", + "string": "options", "type": "string" }, "type": "literal" @@ -328,445 +328,987 @@ { "name": { "name": { - "originalName": "query", + "originalName": "enabled", "camelCase": { - "unsafeName": "query", - "safeName": "query" + "unsafeName": "enabled", + "safeName": "enabled" }, "snakeCase": { - "unsafeName": "query", - "safeName": "query" + "unsafeName": "enabled", + "safeName": "enabled" }, "screamingSnakeCase": { - "unsafeName": "QUERY", - "safeName": "QUERY" + "unsafeName": "ENABLED", + "safeName": "ENABLED" }, "pascalCase": { - "unsafeName": "Query", - "safeName": "Query" + "unsafeName": "Enabled", + "safeName": "Enabled" } }, - "wireValue": "query" + "wireValue": "enabled" }, "valueType": { - "primitive": "STRING", - "type": "primitive" + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" } }, { "name": { "name": { - "originalName": "stream", + "originalName": "values", "camelCase": { - "unsafeName": "stream", - "safeName": "stream" + "unsafeName": "values", + "safeName": "values" }, "snakeCase": { - "unsafeName": "stream", - "safeName": "stream" + "unsafeName": "values", + "safeName": "values" }, "screamingSnakeCase": { - "unsafeName": "STREAM", - "safeName": "STREAM" + "unsafeName": "VALUES", + "safeName": "VALUES" }, "pascalCase": { - "unsafeName": "Stream", - "safeName": "Stream" + "unsafeName": "Values", + "safeName": "Values" } }, - "wireValue": "stream" + "wireValue": "values" }, "valueType": { + "container": { + "type": "map", + "keyType": { + "primitive": "STRING", + "type": "primitive" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + "type": "container" + } + } + ] + }, + "referencedTypes": {}, + "examples": [] + }, + "type_literal:UndiscriminatedOptions": { + "name": { + "name": { + "originalName": "UndiscriminatedOptions", + "camelCase": { + "unsafeName": "undiscriminatedOptions", + "safeName": "undiscriminatedOptions" + }, + "snakeCase": { + "unsafeName": "undiscriminated_options", + "safeName": "undiscriminated_options" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_OPTIONS", + "safeName": "UNDISCRIMINATED_OPTIONS" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedOptions", + "safeName": "UndiscriminatedOptions" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "typeId": "type_literal:UndiscriminatedOptions" + }, + "shape": { + "type": "undiscriminatedUnion", + "members": [ + { + "type": { "container": { "literal": { - "boolean": false, + "string": "options", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "type": { + "container": { + "literal": { + "boolean": true, "type": "boolean" }, "type": "literal" }, "type": "container" } + }, + { + "type": { + "container": { + "type": "map", + "keyType": { + "primitive": "STRING", + "type": "primitive" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + "type": "container" + } } ] }, "referencedTypes": {}, "examples": [] - } - }, - "errors": {}, - "services": { - "service_headers": { + }, + "type_literal:CreateOptionsResponse": { "name": { + "name": { + "originalName": "CreateOptionsResponse", + "camelCase": { + "unsafeName": "createOptionsResponse", + "safeName": "createOptionsResponse" + }, + "snakeCase": { + "unsafeName": "create_options_response", + "safeName": "create_options_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS_RESPONSE", + "safeName": "CREATE_OPTIONS_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateOptionsResponse", + "safeName": "CreateOptionsResponse" + } + }, "fernFilepath": { "allParts": [ { - "originalName": "headers", + "originalName": "literal", "camelCase": { - "unsafeName": "headers", - "safeName": "headers" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "headers", - "safeName": "headers" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "HEADERS", - "safeName": "HEADERS" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Headers", - "safeName": "Headers" + "unsafeName": "Literal", + "safeName": "Literal" } } ], "packagePath": [], "file": { - "originalName": "headers", + "originalName": "literal", "camelCase": { - "unsafeName": "headers", - "safeName": "headers" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "headers", - "safeName": "headers" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "HEADERS", - "safeName": "HEADERS" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Headers", - "safeName": "Headers" + "unsafeName": "Literal", + "safeName": "Literal" } } - } - }, - "basePath": { - "head": "", - "parts": [] + }, + "typeId": "type_literal:CreateOptionsResponse" }, - "headers": [], - "pathParameters": [], - "endpoints": [ - { - "id": "endpoint_headers.send", + "shape": { + "type": "union", + "discriminant": { "name": { - "originalName": "send", + "originalName": "type", "camelCase": { - "unsafeName": "send", - "safeName": "send" + "unsafeName": "type", + "safeName": "type" }, "snakeCase": { - "unsafeName": "send", - "safeName": "send" + "unsafeName": "type", + "safeName": "type" }, "screamingSnakeCase": { - "unsafeName": "SEND", - "safeName": "SEND" + "unsafeName": "TYPE", + "safeName": "TYPE" }, "pascalCase": { - "unsafeName": "Send", - "safeName": "Send" + "unsafeName": "Type", + "safeName": "Type" } }, - "auth": false, - "idempotent": false, - "method": "POST", - "path": { - "head": "/headers", - "parts": [] - }, - "fullPath": { - "head": "headers", - "parts": [] - }, - "pathParameters": [], - "allPathParameters": [], - "queryParameters": [], - "headers": [ - { + "wireValue": "type" + }, + "extends": [], + "baseProperties": [], + "types": [ + { + "discriminantValue": { + "name": { + "originalName": "ok", + "camelCase": { + "unsafeName": "ok", + "safeName": "ok" + }, + "snakeCase": { + "unsafeName": "ok", + "safeName": "ok" + }, + "screamingSnakeCase": { + "unsafeName": "OK", + "safeName": "OK" + }, + "pascalCase": { + "unsafeName": "Ok", + "safeName": "Ok" + } + }, + "wireValue": "ok" + }, + "shape": { + "propertiesType": "singleProperty", "name": { "name": { - "originalName": "endpointVersion", + "originalName": "value", "camelCase": { - "unsafeName": "endpointVersion", - "safeName": "endpointVersion" + "unsafeName": "value", + "safeName": "value" }, "snakeCase": { - "unsafeName": "endpoint_version", - "safeName": "endpoint_version" + "unsafeName": "value", + "safeName": "value" }, "screamingSnakeCase": { - "unsafeName": "ENDPOINT_VERSION", - "safeName": "ENDPOINT_VERSION" + "unsafeName": "VALUE", + "safeName": "VALUE" }, "pascalCase": { - "unsafeName": "EndpointVersion", - "safeName": "EndpointVersion" + "unsafeName": "Value", + "safeName": "Value" } }, - "wireValue": "X-Endpoint-Version" + "wireValue": "value" }, - "valueType": { + "type": { "container": { "literal": { - "string": "02-12-2024", - "type": "string" + "boolean": true, + "type": "boolean" }, "type": "literal" }, "type": "container" } + } + }, + { + "discriminantValue": { + "name": { + "originalName": "options", + "camelCase": { + "unsafeName": "options", + "safeName": "options" + }, + "snakeCase": { + "unsafeName": "options", + "safeName": "options" + }, + "screamingSnakeCase": { + "unsafeName": "OPTIONS", + "safeName": "OPTIONS" + }, + "pascalCase": { + "unsafeName": "Options", + "safeName": "Options" + } + }, + "wireValue": "options" }, - { + "shape": { + "propertiesType": "samePropertiesAsObject", "name": { - "name": { - "originalName": "async", + "originalName": "Options", + "camelCase": { + "unsafeName": "options", + "safeName": "options" + }, + "snakeCase": { + "unsafeName": "options", + "safeName": "options" + }, + "screamingSnakeCase": { + "unsafeName": "OPTIONS", + "safeName": "OPTIONS" + }, + "pascalCase": { + "unsafeName": "Options", + "safeName": "Options" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", "camelCase": { - "unsafeName": "async", - "safeName": "async" + "unsafeName": "literal", + "safeName": "literal" }, "snakeCase": { - "unsafeName": "async", - "safeName": "async" + "unsafeName": "literal", + "safeName": "literal" }, "screamingSnakeCase": { - "unsafeName": "ASYNC", - "safeName": "ASYNC" + "unsafeName": "LITERAL", + "safeName": "LITERAL" }, "pascalCase": { - "unsafeName": "Async", - "safeName": "Async" + "unsafeName": "Literal", + "safeName": "Literal" } - }, - "wireValue": "X-Async" + } }, - "valueType": { - "container": { - "literal": { - "boolean": true, - "type": "boolean" - }, - "type": "literal" - }, - "type": "container" - } + "typeId": "type_literal:Options" } - ], - "requestBody": { - "type": "inlinedRequestBody", - "name": { - "originalName": "SendLiteralsInHeadersRequest", + } + ] + }, + "referencedTypes": {}, + "examples": [] + }, + "type_reference:SendRequest": { + "name": { + "name": { + "originalName": "SendRequest", + "camelCase": { + "unsafeName": "sendRequest", + "safeName": "sendRequest" + }, + "snakeCase": { + "unsafeName": "send_request", + "safeName": "send_request" + }, + "screamingSnakeCase": { + "unsafeName": "SEND_REQUEST", + "safeName": "SEND_REQUEST" + }, + "pascalCase": { + "unsafeName": "SendRequest", + "safeName": "SendRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "reference", "camelCase": { - "unsafeName": "sendLiteralsInHeadersRequest", - "safeName": "sendLiteralsInHeadersRequest" + "unsafeName": "reference", + "safeName": "reference" }, "snakeCase": { - "unsafeName": "send_literals_in_headers_request", - "safeName": "send_literals_in_headers_request" + "unsafeName": "reference", + "safeName": "reference" }, "screamingSnakeCase": { - "unsafeName": "SEND_LITERALS_IN_HEADERS_REQUEST", - "safeName": "SEND_LITERALS_IN_HEADERS_REQUEST" + "unsafeName": "REFERENCE", + "safeName": "REFERENCE" }, "pascalCase": { - "unsafeName": "SendLiteralsInHeadersRequest", - "safeName": "SendLiteralsInHeadersRequest" + "unsafeName": "Reference", + "safeName": "Reference" } + } + ], + "packagePath": [], + "file": { + "originalName": "reference", + "camelCase": { + "unsafeName": "reference", + "safeName": "reference" }, - "extends": [], - "properties": [ - { - "name": { - "name": { - "originalName": "query", - "camelCase": { - "unsafeName": "query", - "safeName": "query" - }, - "snakeCase": { - "unsafeName": "query", - "safeName": "query" - }, - "screamingSnakeCase": { - "unsafeName": "QUERY", - "safeName": "QUERY" - }, - "pascalCase": { - "unsafeName": "Query", - "safeName": "Query" - } - }, - "wireValue": "query" - }, - "valueType": { - "primitive": "STRING", - "type": "primitive" - } - } - ] - }, - "sdkRequest": { - "shape": { - "type": "wrapper", - "wrapperName": { - "originalName": "SendLiteralsInHeadersRequest", + "snakeCase": { + "unsafeName": "reference", + "safeName": "reference" + }, + "screamingSnakeCase": { + "unsafeName": "REFERENCE", + "safeName": "REFERENCE" + }, + "pascalCase": { + "unsafeName": "Reference", + "safeName": "Reference" + } + } + }, + "typeId": "type_reference:SendRequest" + }, + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "prompt", "camelCase": { - "unsafeName": "sendLiteralsInHeadersRequest", - "safeName": "sendLiteralsInHeadersRequest" + "unsafeName": "prompt", + "safeName": "prompt" }, "snakeCase": { - "unsafeName": "send_literals_in_headers_request", - "safeName": "send_literals_in_headers_request" + "unsafeName": "prompt", + "safeName": "prompt" }, "screamingSnakeCase": { - "unsafeName": "SEND_LITERALS_IN_HEADERS_REQUEST", - "safeName": "SEND_LITERALS_IN_HEADERS_REQUEST" + "unsafeName": "PROMPT", + "safeName": "PROMPT" }, "pascalCase": { - "unsafeName": "SendLiteralsInHeadersRequest", - "safeName": "SendLiteralsInHeadersRequest" + "unsafeName": "Prompt", + "safeName": "Prompt" } }, - "bodyKey": { - "originalName": "body", + "wireValue": "prompt" + }, + "valueType": { + "container": { + "literal": { + "string": "You are a helpful assistant", + "type": "string" + }, + "type": "literal" + }, + "type": "container" + } + }, + { + "name": { + "name": { + "originalName": "query", "camelCase": { - "unsafeName": "body", - "safeName": "body" + "unsafeName": "query", + "safeName": "query" }, "snakeCase": { - "unsafeName": "body", - "safeName": "body" + "unsafeName": "query", + "safeName": "query" }, "screamingSnakeCase": { - "unsafeName": "BODY", - "safeName": "BODY" + "unsafeName": "QUERY", + "safeName": "QUERY" }, "pascalCase": { - "unsafeName": "Body", - "safeName": "Body" + "unsafeName": "Query", + "safeName": "Query" } - } - }, - "requestParameterName": { - "originalName": "request", - "camelCase": { - "unsafeName": "request", - "safeName": "request" - }, - "snakeCase": { - "unsafeName": "request", - "safeName": "request" - }, - "screamingSnakeCase": { - "unsafeName": "REQUEST", - "safeName": "REQUEST" }, - "pascalCase": { - "unsafeName": "Request", - "safeName": "Request" + "wireValue": "query" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + { + "name": { + "name": { + "originalName": "stream", + "camelCase": { + "unsafeName": "stream", + "safeName": "stream" + }, + "snakeCase": { + "unsafeName": "stream", + "safeName": "stream" + }, + "screamingSnakeCase": { + "unsafeName": "STREAM", + "safeName": "STREAM" + }, + "pascalCase": { + "unsafeName": "Stream", + "safeName": "Stream" + } + }, + "wireValue": "stream" + }, + "valueType": { + "container": { + "literal": { + "boolean": false, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ] + }, + "referencedTypes": {}, + "examples": [] + } + }, + "errors": {}, + "services": { + "service_headers": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "headers", + "camelCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "snakeCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "screamingSnakeCase": { + "unsafeName": "HEADERS", + "safeName": "HEADERS" + }, + "pascalCase": { + "unsafeName": "Headers", + "safeName": "Headers" } } + ], + "packagePath": [], + "file": { + "originalName": "headers", + "camelCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "snakeCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "screamingSnakeCase": { + "unsafeName": "HEADERS", + "safeName": "HEADERS" + }, + "pascalCase": { + "unsafeName": "Headers", + "safeName": "Headers" + } + } + } + }, + "basePath": { + "head": "", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_headers.send", + "name": { + "originalName": "send", + "camelCase": { + "unsafeName": "send", + "safeName": "send" + }, + "snakeCase": { + "unsafeName": "send", + "safeName": "send" + }, + "screamingSnakeCase": { + "unsafeName": "SEND", + "safeName": "SEND" + }, + "pascalCase": { + "unsafeName": "Send", + "safeName": "Send" + } }, - "response": { - "value": { - "type": "response", - "responseBodyType": { - "type": "named", + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/headers", + "parts": [] + }, + "fullPath": { + "head": "headers", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [ + { + "name": { "name": { - "originalName": "SendResponse", + "originalName": "endpointVersion", "camelCase": { - "unsafeName": "sendResponse", - "safeName": "sendResponse" + "unsafeName": "endpointVersion", + "safeName": "endpointVersion" }, "snakeCase": { - "unsafeName": "send_response", - "safeName": "send_response" + "unsafeName": "endpoint_version", + "safeName": "endpoint_version" }, "screamingSnakeCase": { - "unsafeName": "SEND_RESPONSE", - "safeName": "SEND_RESPONSE" + "unsafeName": "ENDPOINT_VERSION", + "safeName": "ENDPOINT_VERSION" }, "pascalCase": { - "unsafeName": "SendResponse", - "safeName": "SendResponse" + "unsafeName": "EndpointVersion", + "safeName": "EndpointVersion" } }, - "fernFilepath": { - "allParts": [], - "packagePath": [] + "wireValue": "X-Endpoint-Version" + }, + "valueType": { + "container": { + "literal": { + "string": "02-12-2024", + "type": "string" + }, + "type": "literal" }, - "typeId": "type_:SendResponse" + "type": "container" } }, - "type": "json" - }, - "errors": [], - "examples": [ { - "url": "/headers", - "rootPathParameters": [], - "endpointPathParameters": [], - "servicePathParameters": [], - "endpointHeaders": [ - { - "name": { - "name": { - "originalName": "endpointVersion", - "camelCase": { - "unsafeName": "endpointVersion", - "safeName": "endpointVersion" - }, - "snakeCase": { - "unsafeName": "endpoint_version", - "safeName": "endpoint_version" - }, - "screamingSnakeCase": { - "unsafeName": "ENDPOINT_VERSION", - "safeName": "ENDPOINT_VERSION" - }, - "pascalCase": { - "unsafeName": "EndpointVersion", - "safeName": "EndpointVersion" - } - }, - "wireValue": "X-Endpoint-Version" + "name": { + "name": { + "originalName": "async", + "camelCase": { + "unsafeName": "async", + "safeName": "async" }, - "value": { - "shape": { - "primitive": { - "string": { - "original": "02-12-2024" - }, - "type": "string" - }, - "type": "primitive" - }, - "jsonExample": "02-12-2024" + "snakeCase": { + "unsafeName": "async", + "safeName": "async" + }, + "screamingSnakeCase": { + "unsafeName": "ASYNC", + "safeName": "ASYNC" + }, + "pascalCase": { + "unsafeName": "Async", + "safeName": "Async" } }, - { - "name": { - "name": { - "originalName": "async", - "camelCase": { - "unsafeName": "async", - "safeName": "async" - }, - "snakeCase": { - "unsafeName": "async", - "safeName": "async" - }, - "screamingSnakeCase": { - "unsafeName": "ASYNC", - "safeName": "ASYNC" - }, - "pascalCase": { - "unsafeName": "Async", - "safeName": "Async" - } - }, - "wireValue": "X-Async" + "wireValue": "X-Async" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "SendLiteralsInHeadersRequest", + "camelCase": { + "unsafeName": "sendLiteralsInHeadersRequest", + "safeName": "sendLiteralsInHeadersRequest" + }, + "snakeCase": { + "unsafeName": "send_literals_in_headers_request", + "safeName": "send_literals_in_headers_request" + }, + "screamingSnakeCase": { + "unsafeName": "SEND_LITERALS_IN_HEADERS_REQUEST", + "safeName": "SEND_LITERALS_IN_HEADERS_REQUEST" + }, + "pascalCase": { + "unsafeName": "SendLiteralsInHeadersRequest", + "safeName": "SendLiteralsInHeadersRequest" + } + }, + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "query", + "camelCase": { + "unsafeName": "query", + "safeName": "query" + }, + "snakeCase": { + "unsafeName": "query", + "safeName": "query" + }, + "screamingSnakeCase": { + "unsafeName": "QUERY", + "safeName": "QUERY" + }, + "pascalCase": { + "unsafeName": "Query", + "safeName": "Query" + } + }, + "wireValue": "query" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + } + ] + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "SendLiteralsInHeadersRequest", + "camelCase": { + "unsafeName": "sendLiteralsInHeadersRequest", + "safeName": "sendLiteralsInHeadersRequest" + }, + "snakeCase": { + "unsafeName": "send_literals_in_headers_request", + "safeName": "send_literals_in_headers_request" + }, + "screamingSnakeCase": { + "unsafeName": "SEND_LITERALS_IN_HEADERS_REQUEST", + "safeName": "SEND_LITERALS_IN_HEADERS_REQUEST" + }, + "pascalCase": { + "unsafeName": "SendLiteralsInHeadersRequest", + "safeName": "SendLiteralsInHeadersRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + } + }, + "response": { + "value": { + "type": "response", + "responseBodyType": { + "type": "named", + "name": { + "originalName": "SendResponse", + "camelCase": { + "unsafeName": "sendResponse", + "safeName": "sendResponse" + }, + "snakeCase": { + "unsafeName": "send_response", + "safeName": "send_response" + }, + "screamingSnakeCase": { + "unsafeName": "SEND_RESPONSE", + "safeName": "SEND_RESPONSE" + }, + "pascalCase": { + "unsafeName": "SendResponse", + "safeName": "SendResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:SendResponse" + } + }, + "type": "json" + }, + "errors": [], + "examples": [ + { + "url": "/headers", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [ + { + "name": { + "name": { + "originalName": "endpointVersion", + "camelCase": { + "unsafeName": "endpointVersion", + "safeName": "endpointVersion" + }, + "snakeCase": { + "unsafeName": "endpoint_version", + "safeName": "endpoint_version" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINT_VERSION", + "safeName": "ENDPOINT_VERSION" + }, + "pascalCase": { + "unsafeName": "EndpointVersion", + "safeName": "EndpointVersion" + } + }, + "wireValue": "X-Endpoint-Version" + }, + "value": { + "shape": { + "primitive": { + "string": { + "original": "02-12-2024" + }, + "type": "string" + }, + "type": "primitive" + }, + "jsonExample": "02-12-2024" + } + }, + { + "name": { + "name": { + "originalName": "async", + "camelCase": { + "unsafeName": "async", + "safeName": "async" + }, + "snakeCase": { + "unsafeName": "async", + "safeName": "async" + }, + "screamingSnakeCase": { + "unsafeName": "ASYNC", + "safeName": "ASYNC" + }, + "pascalCase": { + "unsafeName": "Async", + "safeName": "Async" + } + }, + "wireValue": "X-Async" }, "value": { "shape": { @@ -1785,15 +2327,770 @@ ] } }, - "jsonExample": { - "message": "The weather is sunny", - "status": 200, - "success": true + "jsonExample": { + "message": "The weather is sunny", + "status": 200, + "success": true + } + } + } + } + ] + } + ] + }, + "service_literal": { + "name": { + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + } + }, + "basePath": { + "head": "/", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "endpoints": [ + { + "id": "endpoint_literal.createOptions", + "name": { + "originalName": "createOptions", + "camelCase": { + "unsafeName": "createOptions", + "safeName": "createOptions" + }, + "snakeCase": { + "unsafeName": "create_options", + "safeName": "create_options" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS", + "safeName": "CREATE_OPTIONS" + }, + "pascalCase": { + "unsafeName": "CreateOptions", + "safeName": "CreateOptions" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/options", + "parts": [] + }, + "fullPath": { + "head": "/options", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "CreateOptionsRequest", + "camelCase": { + "unsafeName": "createOptionsRequest", + "safeName": "createOptionsRequest" + }, + "snakeCase": { + "unsafeName": "create_options_request", + "safeName": "create_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS_REQUEST", + "safeName": "CREATE_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "CreateOptionsRequest", + "safeName": "CreateOptionsRequest" + } + }, + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "values", + "camelCase": { + "unsafeName": "values", + "safeName": "values" + }, + "snakeCase": { + "unsafeName": "values", + "safeName": "values" + }, + "screamingSnakeCase": { + "unsafeName": "VALUES", + "safeName": "VALUES" + }, + "pascalCase": { + "unsafeName": "Values", + "safeName": "Values" + } + }, + "wireValue": "values" + }, + "valueType": { + "container": { + "type": "map", + "keyType": { + "primitive": "STRING", + "type": "primitive" + }, + "valueType": { + "primitive": "STRING", + "type": "primitive" + } + }, + "type": "container" + } + } + ] + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "CreateOptionsRequest", + "camelCase": { + "unsafeName": "createOptionsRequest", + "safeName": "createOptionsRequest" + }, + "snakeCase": { + "unsafeName": "create_options_request", + "safeName": "create_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS_REQUEST", + "safeName": "CREATE_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "CreateOptionsRequest", + "safeName": "CreateOptionsRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + } + }, + "response": { + "value": { + "type": "response", + "responseBodyType": { + "type": "named", + "name": { + "originalName": "CreateOptionsResponse", + "camelCase": { + "unsafeName": "createOptionsResponse", + "safeName": "createOptionsResponse" + }, + "snakeCase": { + "unsafeName": "create_options_response", + "safeName": "create_options_response" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_OPTIONS_RESPONSE", + "safeName": "CREATE_OPTIONS_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CreateOptionsResponse", + "safeName": "CreateOptionsResponse" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "typeId": "type_literal:CreateOptionsResponse" + } + }, + "type": "json" + }, + "errors": [], + "examples": [] + }, + { + "id": "endpoint_literal.getOptions", + "name": { + "originalName": "getOptions", + "camelCase": { + "unsafeName": "getOptions", + "safeName": "getOptions" + }, + "snakeCase": { + "unsafeName": "get_options", + "safeName": "get_options" + }, + "screamingSnakeCase": { + "unsafeName": "GET_OPTIONS", + "safeName": "GET_OPTIONS" + }, + "pascalCase": { + "unsafeName": "GetOptions", + "safeName": "GetOptions" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/options", + "parts": [] + }, + "fullPath": { + "head": "/options", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "GetOptionsRequest", + "camelCase": { + "unsafeName": "getOptionsRequest", + "safeName": "getOptionsRequest" + }, + "snakeCase": { + "unsafeName": "get_options_request", + "safeName": "get_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_OPTIONS_REQUEST", + "safeName": "GET_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetOptionsRequest", + "safeName": "GetOptionsRequest" + } + }, + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "dryRun", + "camelCase": { + "unsafeName": "dryRun", + "safeName": "dryRun" + }, + "snakeCase": { + "unsafeName": "dry_run", + "safeName": "dry_run" + }, + "screamingSnakeCase": { + "unsafeName": "DRY_RUN", + "safeName": "DRY_RUN" + }, + "pascalCase": { + "unsafeName": "DryRun", + "safeName": "DryRun" + } + }, + "wireValue": "dryRun" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ] + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "GetOptionsRequest", + "camelCase": { + "unsafeName": "getOptionsRequest", + "safeName": "getOptionsRequest" + }, + "snakeCase": { + "unsafeName": "get_options_request", + "safeName": "get_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_OPTIONS_REQUEST", + "safeName": "GET_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetOptionsRequest", + "safeName": "GetOptionsRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + } + }, + "response": { + "value": { + "type": "response", + "responseBodyType": { + "type": "named", + "name": { + "originalName": "Options", + "camelCase": { + "unsafeName": "options", + "safeName": "options" + }, + "snakeCase": { + "unsafeName": "options", + "safeName": "options" + }, + "screamingSnakeCase": { + "unsafeName": "OPTIONS", + "safeName": "OPTIONS" + }, + "pascalCase": { + "unsafeName": "Options", + "safeName": "Options" } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "typeId": "type_literal:Options" + } + }, + "type": "json" + }, + "errors": [], + "examples": [] + }, + { + "id": "endpoint_literal.getUndiscriminatedOptions", + "name": { + "originalName": "getUndiscriminatedOptions", + "camelCase": { + "unsafeName": "getUndiscriminatedOptions", + "safeName": "getUndiscriminatedOptions" + }, + "snakeCase": { + "unsafeName": "get_undiscriminated_options", + "safeName": "get_undiscriminated_options" + }, + "screamingSnakeCase": { + "unsafeName": "GET_UNDISCRIMINATED_OPTIONS", + "safeName": "GET_UNDISCRIMINATED_OPTIONS" + }, + "pascalCase": { + "unsafeName": "GetUndiscriminatedOptions", + "safeName": "GetUndiscriminatedOptions" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/options", + "parts": [] + }, + "fullPath": { + "head": "/options", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "inlinedRequestBody", + "name": { + "originalName": "GetUndiscriminatedOptionsRequest", + "camelCase": { + "unsafeName": "getUndiscriminatedOptionsRequest", + "safeName": "getUndiscriminatedOptionsRequest" + }, + "snakeCase": { + "unsafeName": "get_undiscriminated_options_request", + "safeName": "get_undiscriminated_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_UNDISCRIMINATED_OPTIONS_REQUEST", + "safeName": "GET_UNDISCRIMINATED_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetUndiscriminatedOptionsRequest", + "safeName": "GetUndiscriminatedOptionsRequest" + } + }, + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "dryRun", + "camelCase": { + "unsafeName": "dryRun", + "safeName": "dryRun" + }, + "snakeCase": { + "unsafeName": "dry_run", + "safeName": "dry_run" + }, + "screamingSnakeCase": { + "unsafeName": "DRY_RUN", + "safeName": "DRY_RUN" + }, + "pascalCase": { + "unsafeName": "DryRun", + "safeName": "DryRun" + } + }, + "wireValue": "dryRun" + }, + "valueType": { + "container": { + "literal": { + "boolean": true, + "type": "boolean" + }, + "type": "literal" + }, + "type": "container" + } + } + ] + }, + "sdkRequest": { + "shape": { + "type": "wrapper", + "wrapperName": { + "originalName": "GetUndiscriminatedOptionsRequest", + "camelCase": { + "unsafeName": "getUndiscriminatedOptionsRequest", + "safeName": "getUndiscriminatedOptionsRequest" + }, + "snakeCase": { + "unsafeName": "get_undiscriminated_options_request", + "safeName": "get_undiscriminated_options_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_UNDISCRIMINATED_OPTIONS_REQUEST", + "safeName": "GET_UNDISCRIMINATED_OPTIONS_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetUndiscriminatedOptionsRequest", + "safeName": "GetUndiscriminatedOptionsRequest" + } + }, + "bodyKey": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" } } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } } - ] + }, + "response": { + "value": { + "type": "response", + "responseBodyType": { + "type": "named", + "name": { + "originalName": "UndiscriminatedOptions", + "camelCase": { + "unsafeName": "undiscriminatedOptions", + "safeName": "undiscriminatedOptions" + }, + "snakeCase": { + "unsafeName": "undiscriminated_options", + "safeName": "undiscriminated_options" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_OPTIONS", + "safeName": "UNDISCRIMINATED_OPTIONS" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedOptions", + "safeName": "UndiscriminatedOptions" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "typeId": "type_literal:UndiscriminatedOptions" + } + }, + "type": "json" + }, + "errors": [], + "examples": [] } ] }, @@ -3841,6 +5138,11 @@ "variables": [], "serviceTypeReferenceInfo": { "typesReferencedOnlyByService": { + "service_literal": [ + "type_literal:Options", + "type_literal:UndiscriminatedOptions", + "type_literal:CreateOptionsResponse" + ], "service_reference": [ "type_reference:SendRequest" ] @@ -3992,6 +5294,80 @@ "subpackages": [], "hasEndpointsInTree": true }, + "subpackage_literal": { + "name": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + }, + "websocket": null, + "fernFilepath": { + "allParts": [ + { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + ], + "packagePath": [], + "file": { + "originalName": "literal", + "camelCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "snakeCase": { + "unsafeName": "literal", + "safeName": "literal" + }, + "screamingSnakeCase": { + "unsafeName": "LITERAL", + "safeName": "LITERAL" + }, + "pascalCase": { + "unsafeName": "Literal", + "safeName": "Literal" + } + } + }, + "service": "service_literal", + "types": [ + "type_literal:Options", + "type_literal:UndiscriminatedOptions", + "type_literal:CreateOptionsResponse" + ], + "errors": [], + "subpackages": [], + "hasEndpointsInTree": true + }, "subpackage_path": { "name": { "originalName": "path", @@ -4218,6 +5594,7 @@ "subpackages": [ "subpackage_headers", "subpackage_inlined", + "subpackage_literal", "subpackage_path", "subpackage_query", "subpackage_reference" diff --git a/seed/csharp-sdk/multi-url-environment/ir.json b/seed/csharp-sdk/multi-url-environment/ir.json index 36dd78936a0..7d3e30331ca 100644 --- a/seed/csharp-sdk/multi-url-environment/ir.json +++ b/seed/csharp-sdk/multi-url-environment/ir.json @@ -621,6 +621,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_ec2": { "name": { @@ -642,6 +643,7 @@ "safeName": "Ec2" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -711,6 +713,7 @@ "safeName": "S3" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -766,6 +769,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/no-environment/ir.json b/seed/csharp-sdk/no-environment/ir.json index 0de013b071f..772ff090b77 100644 --- a/seed/csharp-sdk/no-environment/ir.json +++ b/seed/csharp-sdk/no-environment/ir.json @@ -189,6 +189,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_dummy": { "name": { @@ -210,6 +211,7 @@ "safeName": "Dummy" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -265,6 +267,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/object/ir.json b/seed/csharp-sdk/object/ir.json index d789120247d..4bd1c4ebb2b 100644 --- a/seed/csharp-sdk/object/ir.json +++ b/seed/csharp-sdk/object/ir.json @@ -2636,12 +2636,14 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": {}, "rootPackage": { "fernFilepath": { "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:Type", "type_:Name" diff --git a/seed/csharp-sdk/objects-with-imports/ir.json b/seed/csharp-sdk/objects-with-imports/ir.json index 065ac27222a..bc5a2975807 100644 --- a/seed/csharp-sdk/objects-with-imports/ir.json +++ b/seed/csharp-sdk/objects-with-imports/ir.json @@ -7504,6 +7504,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_commons": { "name": { @@ -7525,6 +7526,7 @@ "safeName": "Commons" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -7596,6 +7598,7 @@ "safeName": "Metadata" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -7705,6 +7708,7 @@ "safeName": "File" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -7778,6 +7782,7 @@ "safeName": "Directory" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -7873,6 +7878,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:Node", "type_:Tree" diff --git a/seed/csharp-sdk/optional/ir.json b/seed/csharp-sdk/optional/ir.json index c8781d0db2e..02c0430890f 100644 --- a/seed/csharp-sdk/optional/ir.json +++ b/seed/csharp-sdk/optional/ir.json @@ -235,6 +235,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_optional": { "name": { @@ -256,6 +257,7 @@ "safeName": "Optional" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -311,6 +313,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/package-yml/ir.json b/seed/csharp-sdk/package-yml/ir.json index db24c96c2e5..fec55d13865 100644 --- a/seed/csharp-sdk/package-yml/ir.json +++ b/seed/csharp-sdk/package-yml/ir.json @@ -574,6 +574,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -595,6 +596,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -650,6 +652,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "service": "service_", "types": [], "errors": [], diff --git a/seed/csharp-sdk/plain-text/ir.json b/seed/csharp-sdk/plain-text/ir.json index 54a86927deb..ec080b68260 100644 --- a/seed/csharp-sdk/plain-text/ir.json +++ b/seed/csharp-sdk/plain-text/ir.json @@ -159,6 +159,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -180,6 +181,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -235,6 +237,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/query-parameters/ir.json b/seed/csharp-sdk/query-parameters/ir.json index 36743526455..d28bee23c51 100644 --- a/seed/csharp-sdk/query-parameters/ir.json +++ b/seed/csharp-sdk/query-parameters/ir.json @@ -1148,6 +1148,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_user": { "name": { @@ -1169,6 +1170,7 @@ "safeName": "User" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -1227,6 +1229,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/reserved-keywords/ir.json b/seed/csharp-sdk/reserved-keywords/ir.json index c73a1c275a0..b48d379be8f 100644 --- a/seed/csharp-sdk/reserved-keywords/ir.json +++ b/seed/csharp-sdk/reserved-keywords/ir.json @@ -540,6 +540,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_package": { "name": { @@ -561,6 +562,7 @@ "safeName": "Package" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -619,6 +621,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/response-property/ir.json b/seed/csharp-sdk/response-property/ir.json index 15aa7ea95d4..8ee0529ce5c 100644 --- a/seed/csharp-sdk/response-property/ir.json +++ b/seed/csharp-sdk/response-property/ir.json @@ -2374,6 +2374,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -2395,6 +2396,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -2455,6 +2457,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [ "type_:StringResponse", "type_:OptionalStringResponse", diff --git a/seed/csharp-sdk/single-url-environment-default/ir.json b/seed/csharp-sdk/single-url-environment-default/ir.json index 1fa0ffb938b..41828252cc5 100644 --- a/seed/csharp-sdk/single-url-environment-default/ir.json +++ b/seed/csharp-sdk/single-url-environment-default/ir.json @@ -243,6 +243,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_dummy": { "name": { @@ -264,6 +265,7 @@ "safeName": "Dummy" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -319,6 +321,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/single-url-environment-no-default/ir.json b/seed/csharp-sdk/single-url-environment-no-default/ir.json index 1f211f0422f..7d7284bcb0c 100644 --- a/seed/csharp-sdk/single-url-environment-no-default/ir.json +++ b/seed/csharp-sdk/single-url-environment-no-default/ir.json @@ -242,6 +242,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_dummy": { "name": { @@ -263,6 +264,7 @@ "safeName": "Dummy" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -318,6 +320,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/streaming/ir.json b/seed/csharp-sdk/streaming/ir.json index 08724880951..805bc52dcec 100644 --- a/seed/csharp-sdk/streaming/ir.json +++ b/seed/csharp-sdk/streaming/ir.json @@ -485,6 +485,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_dummy": { "name": { @@ -506,6 +507,7 @@ "safeName": "Dummy" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -563,6 +565,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/trace/ir.json b/seed/csharp-sdk/trace/ir.json index e4e90c0014e..9a8f135eab0 100644 --- a/seed/csharp-sdk/trace/ir.json +++ b/seed/csharp-sdk/trace/ir.json @@ -81219,6 +81219,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_v2": { "name": { @@ -81240,6 +81241,7 @@ "safeName": "V2" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81313,6 +81315,7 @@ "safeName": "Admin" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81384,6 +81387,7 @@ "safeName": "Commons" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81479,6 +81483,7 @@ "safeName": "Homepage" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81548,6 +81553,7 @@ "safeName": "LangServer" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81619,6 +81625,7 @@ "safeName": "Migration" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81691,6 +81698,7 @@ "safeName": "Playlist" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81770,6 +81778,7 @@ "safeName": "Problem" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -81851,6 +81860,7 @@ "safeName": "Submission" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82002,6 +82012,7 @@ "safeName": "Sysprop" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82071,6 +82082,7 @@ "safeName": "Problem" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82221,6 +82233,7 @@ "safeName": "V3" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82330,6 +82343,7 @@ "safeName": "Problem" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -82504,6 +82518,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/undiscriminated-unions/ir.json b/seed/csharp-sdk/undiscriminated-unions/ir.json index 0dde13b5dc6..65641e9c666 100644 --- a/seed/csharp-sdk/undiscriminated-unions/ir.json +++ b/seed/csharp-sdk/undiscriminated-unions/ir.json @@ -524,6 +524,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_union": { "name": { @@ -545,6 +546,7 @@ "safeName": "Union" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -602,6 +604,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/unknown/ir.json b/seed/csharp-sdk/unknown/ir.json index 337a487bb5d..e3a3dd31e24 100644 --- a/seed/csharp-sdk/unknown/ir.json +++ b/seed/csharp-sdk/unknown/ir.json @@ -391,6 +391,7 @@ ] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_unknown": { "name": { @@ -412,6 +413,7 @@ "safeName": "Unknown" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -470,6 +472,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/variables/ir.json b/seed/csharp-sdk/variables/ir.json index 9de892aad8f..706e82281d4 100644 --- a/seed/csharp-sdk/variables/ir.json +++ b/seed/csharp-sdk/variables/ir.json @@ -249,6 +249,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_service": { "name": { @@ -270,6 +271,7 @@ "safeName": "Service" } }, + "websocket": null, "fernFilepath": { "allParts": [ { @@ -325,6 +327,7 @@ "allParts": [], "packagePath": [] }, + "websocket": null, "types": [], "errors": [], "subpackages": [ diff --git a/seed/fastapi/seed.yml b/seed/fastapi/seed.yml index 46eefe92faf..be670d91cf6 100644 --- a/seed/fastapi/seed.yml +++ b/seed/fastapi/seed.yml @@ -27,4 +27,5 @@ allowedFailures: - query-parameters - response-property - streaming - + - literal + - websocket diff --git a/seed/java-model/literal-headers/.github/workflows/ci.yml b/seed/java-model/literal-headers/.github/workflows/ci.yml new file mode 100644 index 00000000000..260533c2a98 --- /dev/null +++ b/seed/java-model/literal-headers/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: ci + +on: [push] + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up Java + id: setup-jre + uses: actions/setup-java@v1 + with: + java-version: "11" + architecture: x64 + + - name: Compile + run: ./gradlew compileJava + + test: + needs: [ compile ] + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up Java + id: setup-jre + uses: actions/setup-java@v1 + with: + java-version: "11" + architecture: x64 + + - name: Test + run: ./gradlew test diff --git a/seed/java-model/literal-headers/.gitignore b/seed/java-model/literal-headers/.gitignore new file mode 100644 index 00000000000..d4199abc2cd --- /dev/null +++ b/seed/java-model/literal-headers/.gitignore @@ -0,0 +1,24 @@ +*.class +.project +.gradle +? +.classpath +.checkstyle +.settings +.node +build + +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ +out/ + +# Eclipse/IntelliJ APT +generated_src/ +generated_testSrc/ +generated/ + +bin +build \ No newline at end of file diff --git a/seed/java-model/literal-headers/build.gradle b/seed/java-model/literal-headers/build.gradle new file mode 100644 index 00000000000..3fb46ecf105 --- /dev/null +++ b/seed/java-model/literal-headers/build.gradle @@ -0,0 +1,40 @@ +plugins { + id 'java-library' + id 'maven-publish' + id 'com.diffplug.spotless' version '6.11.0' +} + +repositories { + mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/releases/' + } +} + +dependencies { + api 'com.fasterxml.jackson.core:jackson-databind:2.13.0' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.3' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.3' +} + + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + +spotless { + java { + palantirJavaFormat() + } +} + +java { + withSourcesJar() + withJavadocJar() +} + +test { + useJUnitPlatform() + testLogging { + showStandardStreams = true + } +} diff --git a/seed/java-model/literal-headers/gradle/wrapper/gradle-wrapper.jar b/seed/java-model/literal-headers/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000000..d64cd491770 Binary files /dev/null and b/seed/java-model/literal-headers/gradle/wrapper/gradle-wrapper.jar differ diff --git a/seed/java-model/literal-headers/gradle/wrapper/gradle-wrapper.properties b/seed/java-model/literal-headers/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..1af9e0930b8 --- /dev/null +++ b/seed/java-model/literal-headers/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/seed/java-model/literal-headers/gradlew b/seed/java-model/literal-headers/gradlew new file mode 100755 index 00000000000..1aa94a42690 --- /dev/null +++ b/seed/java-model/literal-headers/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/seed/java-model/literal-headers/gradlew.bat b/seed/java-model/literal-headers/gradlew.bat new file mode 100644 index 00000000000..6689b85beec --- /dev/null +++ b/seed/java-model/literal-headers/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/seed/java-model/literal-headers/settings.gradle b/seed/java-model/literal-headers/settings.gradle new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/java-model/literal-headers/snippet.json b/seed/java-model/literal-headers/snippet.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/java-model/literal-headers/src/main/java/com/seed/literalHeaders/core/DateTimeDeserializer.java b/seed/java-model/literal-headers/src/main/java/com/seed/literalHeaders/core/DateTimeDeserializer.java new file mode 100644 index 00000000000..b184f88c06f --- /dev/null +++ b/seed/java-model/literal-headers/src/main/java/com/seed/literalHeaders/core/DateTimeDeserializer.java @@ -0,0 +1,55 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.module.SimpleModule; +import java.io.IOException; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalQueries; + +/** + * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. + */ +class DateTimeDeserializer extends JsonDeserializer { + private static final SimpleModule MODULE; + + static { + MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); + } + + /** + * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. + * + * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. + */ + public static SimpleModule getModule() { + return MODULE; + } + + @Override + public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { + JsonToken token = parser.currentToken(); + if (token == JsonToken.VALUE_NUMBER_INT) { + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC); + } else { + TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( + parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); + + if (temporal.query(TemporalQueries.offset()) == null) { + return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); + } else { + return OffsetDateTime.from(temporal); + } + } + } +} diff --git a/seed/java-model/literal-headers/src/main/java/com/seed/literalHeaders/core/ObjectMappers.java b/seed/java-model/literal-headers/src/main/java/com/seed/literalHeaders/core/ObjectMappers.java new file mode 100644 index 00000000000..a58b82b7b8f --- /dev/null +++ b/seed/java-model/literal-headers/src/main/java/com/seed/literalHeaders/core/ObjectMappers.java @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import java.io.IOException; + +public final class ObjectMappers { + public static final ObjectMapper JSON_MAPPER = JsonMapper.builder() + .addModule(new Jdk8Module()) + .addModule(new JavaTimeModule()) + .addModule(DateTimeDeserializer.getModule()) + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .build(); + + private ObjectMappers() {} + + public static String stringify(Object o) { + try { + return JSON_MAPPER + .setSerializationInclusion(JsonInclude.Include.ALWAYS) + .writerWithDefaultPrettyPrinter() + .writeValueAsString(o); + } catch (IOException e) { + return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); + } + } +} diff --git a/seed/java-model/seed.yml b/seed/java-model/seed.yml index 58a9d47d0c8..b38931672b2 100644 --- a/seed/java-model/seed.yml +++ b/seed/java-model/seed.yml @@ -10,12 +10,14 @@ defaultOutputMode: github scripts: - docker: fernapi/java-seed commands: - - source "$HOME/.sdkman/bin/sdkman-init.sh" - - sdk use java 11.0.21-zulu - - gradle compileJava + - source ~/.bash_profile + - ./gradlew compileJava + # - jenv shell 1.8 && ./gradlew compileJava allowedFailures: - enum - exhaustive - extends - reserved-keywords - trace + - file-upload + - undiscriminated-unions. diff --git a/seed/java-sdk/literal-headers/.github/workflows/ci.yml b/seed/java-sdk/literal-headers/.github/workflows/ci.yml new file mode 100644 index 00000000000..260533c2a98 --- /dev/null +++ b/seed/java-sdk/literal-headers/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: ci + +on: [push] + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up Java + id: setup-jre + uses: actions/setup-java@v1 + with: + java-version: "11" + architecture: x64 + + - name: Compile + run: ./gradlew compileJava + + test: + needs: [ compile ] + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up Java + id: setup-jre + uses: actions/setup-java@v1 + with: + java-version: "11" + architecture: x64 + + - name: Test + run: ./gradlew test diff --git a/seed/java-sdk/literal-headers/.gitignore b/seed/java-sdk/literal-headers/.gitignore new file mode 100644 index 00000000000..d4199abc2cd --- /dev/null +++ b/seed/java-sdk/literal-headers/.gitignore @@ -0,0 +1,24 @@ +*.class +.project +.gradle +? +.classpath +.checkstyle +.settings +.node +build + +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ +out/ + +# Eclipse/IntelliJ APT +generated_src/ +generated_testSrc/ +generated/ + +bin +build \ No newline at end of file diff --git a/seed/java-sdk/literal-headers/build.gradle b/seed/java-sdk/literal-headers/build.gradle new file mode 100644 index 00000000000..26e4017afc4 --- /dev/null +++ b/seed/java-sdk/literal-headers/build.gradle @@ -0,0 +1,43 @@ +plugins { + id 'java-library' + id 'maven-publish' + id 'com.diffplug.spotless' version '6.11.0' +} + +repositories { + mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/releases/' + } +} + +dependencies { + api 'com.squareup.okhttp3:okhttp:4.12.0' + api 'com.fasterxml.jackson.core:jackson-databind:2.13.0' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.3' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.3' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' +} + + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + +spotless { + java { + palantirJavaFormat() + } +} + +java { + withSourcesJar() + withJavadocJar() +} + +test { + useJUnitPlatform() + testLogging { + showStandardStreams = true + } +} diff --git a/seed/java-sdk/literal-headers/gradle/wrapper/gradle-wrapper.jar b/seed/java-sdk/literal-headers/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000000..d64cd491770 Binary files /dev/null and b/seed/java-sdk/literal-headers/gradle/wrapper/gradle-wrapper.jar differ diff --git a/seed/java-sdk/literal-headers/gradle/wrapper/gradle-wrapper.properties b/seed/java-sdk/literal-headers/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..a80b22ce5cf --- /dev/null +++ b/seed/java-sdk/literal-headers/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/seed/java-sdk/literal-headers/gradlew b/seed/java-sdk/literal-headers/gradlew new file mode 100755 index 00000000000..1aa94a42690 --- /dev/null +++ b/seed/java-sdk/literal-headers/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/seed/java-sdk/literal-headers/gradlew.bat b/seed/java-sdk/literal-headers/gradlew.bat new file mode 100644 index 00000000000..7101f8e4676 --- /dev/null +++ b/seed/java-sdk/literal-headers/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/seed/java-sdk/literal-headers/sample-app/build.gradle b/seed/java-sdk/literal-headers/sample-app/build.gradle new file mode 100644 index 00000000000..4ee8f227b7a --- /dev/null +++ b/seed/java-sdk/literal-headers/sample-app/build.gradle @@ -0,0 +1,19 @@ +plugins { + id 'java-library' +} + +repositories { + mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/releases/' + } +} + +dependencies { + implementation rootProject +} + + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + diff --git a/seed/java-sdk/literal-headers/sample-app/src/main/java/sample/App.java b/seed/java-sdk/literal-headers/sample-app/src/main/java/sample/App.java new file mode 100644 index 00000000000..8f8d8823ab5 --- /dev/null +++ b/seed/java-sdk/literal-headers/sample-app/src/main/java/sample/App.java @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +package sample; + +import java.lang.String; + +public final class App { + public static void main(String[] args) { + // import com.seed.literalHeaders.SeedLiteralHeadersClient + } +} diff --git a/seed/java-sdk/literal-headers/settings.gradle b/seed/java-sdk/literal-headers/settings.gradle new file mode 100644 index 00000000000..aed36fec10b --- /dev/null +++ b/seed/java-sdk/literal-headers/settings.gradle @@ -0,0 +1 @@ +include 'sample-app' \ No newline at end of file diff --git a/seed/java-sdk/literal-headers/snippet.json b/seed/java-sdk/literal-headers/snippet.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/SeedLiteralHeadersClient.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/SeedLiteralHeadersClient.java new file mode 100644 index 00000000000..61ad3551177 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/SeedLiteralHeadersClient.java @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders; + +import com.seed.literalHeaders.core.ClientOptions; +import com.seed.literalHeaders.core.Suppliers; +import com.seed.literalHeaders.resources.noheaders.NoHeadersClient; +import com.seed.literalHeaders.resources.onlyliteralheaders.OnlyLiteralHeadersClient; +import com.seed.literalHeaders.resources.withnonliteralheaders.WithNonLiteralHeadersClient; +import java.util.function.Supplier; + +public class SeedLiteralHeadersClient { + protected final ClientOptions clientOptions; + + protected final Supplier noHeadersClient; + + protected final Supplier onlyLiteralHeadersClient; + + protected final Supplier withNonLiteralHeadersClient; + + public SeedLiteralHeadersClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.noHeadersClient = Suppliers.memoize(() -> new NoHeadersClient(clientOptions)); + this.onlyLiteralHeadersClient = Suppliers.memoize(() -> new OnlyLiteralHeadersClient(clientOptions)); + this.withNonLiteralHeadersClient = Suppliers.memoize(() -> new WithNonLiteralHeadersClient(clientOptions)); + } + + public NoHeadersClient noHeaders() { + return this.noHeadersClient.get(); + } + + public OnlyLiteralHeadersClient onlyLiteralHeaders() { + return this.onlyLiteralHeadersClient.get(); + } + + public WithNonLiteralHeadersClient withNonLiteralHeaders() { + return this.withNonLiteralHeadersClient.get(); + } + + public static SeedLiteralHeadersClientBuilder builder() { + return new SeedLiteralHeadersClientBuilder(); + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/SeedLiteralHeadersClientBuilder.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/SeedLiteralHeadersClientBuilder.java new file mode 100644 index 00000000000..9288439a333 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/SeedLiteralHeadersClientBuilder.java @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders; + +import com.seed.literalHeaders.core.ClientOptions; +import com.seed.literalHeaders.core.Environment; + +public final class SeedLiteralHeadersClientBuilder { + private ClientOptions.Builder clientOptionsBuilder = ClientOptions.builder(); + + private String apiHeader = null; + + private String apiTest = null; + + private Environment environment; + + /** + * Sets apiHeader + */ + public SeedLiteralHeadersClientBuilder apiHeader(String apiHeader) { + this.apiHeader = apiHeader; + return this; + } + + /** + * Sets apiTest + */ + public SeedLiteralHeadersClientBuilder apiTest(String apiTest) { + this.apiTest = apiTest; + return this; + } + + public SeedLiteralHeadersClientBuilder url(String url) { + this.environment = Environment.custom(url); + return this; + } + + public SeedLiteralHeadersClient build() { + this.clientOptionsBuilder.addHeader("X-API-Header", this.apiHeader); + this.clientOptionsBuilder.addHeader("X-API-Test", this.apiTest); + clientOptionsBuilder.environment(this.environment); + return new SeedLiteralHeadersClient(clientOptionsBuilder.build()); + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/ApiError.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/ApiError.java new file mode 100644 index 00000000000..f6a662a82c0 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/ApiError.java @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +public final class ApiError extends RuntimeException { + private final int statusCode; + + private final Object body; + + public ApiError(int statusCode, Object body) { + this.statusCode = statusCode; + this.body = body; + } + + public int statusCode() { + return this.statusCode; + } + + public Object body() { + return this.body; + } + + @java.lang.Override + public String toString() { + return "ApiError{" + "statusCode: " + statusCode + ", body: " + body + "}"; + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/ClientOptions.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/ClientOptions.java new file mode 100644 index 00000000000..687a90544e7 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/ClientOptions.java @@ -0,0 +1,86 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Supplier; +import okhttp3.OkHttpClient; + +public final class ClientOptions { + private final Environment environment; + + private final Map headers; + + private final Map> headerSuppliers; + + private final OkHttpClient httpClient; + + private ClientOptions( + Environment environment, + Map headers, + Map> headerSuppliers, + OkHttpClient httpClient) { + this.environment = environment; + this.headers = new HashMap<>(); + this.headers.putAll(headers); + this.headers.putAll(Map.of("X-Fern-Language", "JAVA")); + this.headerSuppliers = headerSuppliers; + this.httpClient = httpClient; + ; + } + + public Environment environment() { + return this.environment; + } + + public Map headers(RequestOptions requestOptions) { + Map values = new HashMap<>(this.headers); + headerSuppliers.forEach((key, supplier) -> { + values.put(key, supplier.get()); + }); + if (requestOptions != null) { + values.putAll(requestOptions.getHeaders()); + } + return values; + } + + public OkHttpClient httpClient() { + return this.httpClient; + } + + public static Builder builder() { + return new Builder(); + } + + public static final class Builder { + private Environment environment; + + private final Map headers = new HashMap<>(); + + private final Map> headerSuppliers = new HashMap<>(); + + public Builder environment(Environment environment) { + this.environment = environment; + return this; + } + + public Builder addHeader(String key, String value) { + this.headers.put(key, value); + return this; + } + + public Builder addHeader(String key, Supplier value) { + this.headerSuppliers.put(key, value); + return this; + } + + public ClientOptions build() { + OkHttpClient okhttpClient = new OkHttpClient.Builder() + .addInterceptor(new RetryInterceptor(3)) + .build(); + return new ClientOptions(environment, headers, headerSuppliers, okhttpClient); + } + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/DateTimeDeserializer.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/DateTimeDeserializer.java new file mode 100644 index 00000000000..b184f88c06f --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/DateTimeDeserializer.java @@ -0,0 +1,55 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.module.SimpleModule; +import java.io.IOException; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalQueries; + +/** + * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. + */ +class DateTimeDeserializer extends JsonDeserializer { + private static final SimpleModule MODULE; + + static { + MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); + } + + /** + * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. + * + * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. + */ + public static SimpleModule getModule() { + return MODULE; + } + + @Override + public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { + JsonToken token = parser.currentToken(); + if (token == JsonToken.VALUE_NUMBER_INT) { + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC); + } else { + TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( + parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); + + if (temporal.query(TemporalQueries.offset()) == null) { + return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); + } else { + return OffsetDateTime.from(temporal); + } + } + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/Environment.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/Environment.java new file mode 100644 index 00000000000..30625077921 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/Environment.java @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +public final class Environment { + private final String url; + + private Environment(String url) { + this.url = url; + } + + public String getUrl() { + return this.url; + } + + public static Environment custom(String url) { + return new Environment(url); + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/MediaTypes.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/MediaTypes.java new file mode 100644 index 00000000000..cf766db5e2a --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/MediaTypes.java @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import okhttp3.MediaType; + +public final class MediaTypes { + + public static final MediaType APPLICATION_JSON = MediaType.parse("application/json"); + + private MediaTypes() {} +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/ObjectMappers.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/ObjectMappers.java new file mode 100644 index 00000000000..a58b82b7b8f --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/ObjectMappers.java @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import java.io.IOException; + +public final class ObjectMappers { + public static final ObjectMapper JSON_MAPPER = JsonMapper.builder() + .addModule(new Jdk8Module()) + .addModule(new JavaTimeModule()) + .addModule(DateTimeDeserializer.getModule()) + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .build(); + + private ObjectMappers() {} + + public static String stringify(Object o) { + try { + return JSON_MAPPER + .setSerializationInclusion(JsonInclude.Include.ALWAYS) + .writerWithDefaultPrettyPrinter() + .writeValueAsString(o); + } catch (IOException e) { + return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); + } + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/RequestOptions.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/RequestOptions.java new file mode 100644 index 00000000000..9dfc9c3b278 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/RequestOptions.java @@ -0,0 +1,84 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + +public final class RequestOptions { + private final String apiHeader; + + private final String apiTest; + + private final Optional timeout; + + private final TimeUnit timeoutTimeUnit; + + private RequestOptions(String apiHeader, String apiTest, Optional timeout, TimeUnit timeoutTimeUnit) { + this.apiHeader = apiHeader; + this.apiTest = apiTest; + this.timeout = timeout; + this.timeoutTimeUnit = timeoutTimeUnit; + } + + public Optional getTimeout() { + return timeout; + } + + public TimeUnit getTimeoutTimeUnit() { + return timeoutTimeUnit; + } + + public Map getHeaders() { + Map headers = new HashMap<>(); + if (this.apiHeader != null) { + headers.put("X-API-Header", this.apiHeader); + } + if (this.apiTest != null) { + headers.put("X-API-Test", this.apiTest); + } + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + public static final class Builder { + private String apiHeader = null; + + private String apiTest = null; + + private Optional timeout = null; + + private TimeUnit timeoutTimeUnit = TimeUnit.SECONDS; + + public Builder apiHeader(String apiHeader) { + this.apiHeader = apiHeader; + return this; + } + + public Builder apiTest(String apiTest) { + this.apiTest = apiTest; + return this; + } + + public Builder timeout(Integer timeout) { + this.timeout = Optional.of(timeout); + return this; + } + + public Builder timeout(Integer timeout, TimeUnit timeoutTimeUnit) { + this.timeout = Optional.of(timeout); + this.timeoutTimeUnit = timeoutTimeUnit; + return this; + } + + public RequestOptions build() { + return new RequestOptions(apiHeader, apiTest, timeout, timeoutTimeUnit); + } + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/RetryInterceptor.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/RetryInterceptor.java new file mode 100644 index 00000000000..33163251f8e --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/RetryInterceptor.java @@ -0,0 +1,78 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import java.io.IOException; +import java.time.Duration; +import java.util.Optional; +import java.util.Random; +import okhttp3.Interceptor; +import okhttp3.Response; + +public class RetryInterceptor implements Interceptor { + + private static final Duration ONE_SECOND = Duration.ofSeconds(1); + private final ExponentialBackoff backoff; + private final Random random = new Random(); + + public RetryInterceptor(int maxRetries) { + this.backoff = new ExponentialBackoff(maxRetries); + } + + @Override + public Response intercept(Chain chain) throws IOException { + Response response = chain.proceed(chain.request()); + + if (shouldRetry(response.code())) { + return retryChain(response, chain); + } + + return response; + } + + private Response retryChain(Response response, Chain chain) throws IOException { + Optional nextBackoff = this.backoff.nextBackoff(); + while (nextBackoff.isPresent()) { + try { + Thread.sleep(nextBackoff.get().toMillis()); + } catch (InterruptedException e) { + throw new IOException("Interrupted while trying request", e); + } + response.close(); + response = chain.proceed(chain.request()); + if (shouldRetry(response.code())) { + nextBackoff = this.backoff.nextBackoff(); + } else { + return response; + } + } + + return response; + } + + private static boolean shouldRetry(int statusCode) { + return statusCode == 408 || statusCode == 409 || statusCode == 429 || statusCode >= 500; + } + + private final class ExponentialBackoff { + + private final int maxNumRetries; + + private int retryNumber = 0; + + ExponentialBackoff(int maxNumRetries) { + this.maxNumRetries = maxNumRetries; + } + + public Optional nextBackoff() { + retryNumber += 1; + if (retryNumber > maxNumRetries) { + return Optional.empty(); + } + + int upperBound = (int) Math.pow(2, retryNumber); + return Optional.of(ONE_SECOND.multipliedBy(random.nextInt(upperBound))); + } + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/Stream.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/Stream.java new file mode 100644 index 00000000000..366fc6fc3d6 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/Stream.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import java.io.Reader; +import java.util.Iterator; +import java.util.NoSuchElementException; +import java.util.Scanner; + +/** + * The {@code Stream} class implmenets {@link Iterable} to provide a simple mechanism for reading and parsing + * objects of a given type from data streamed via a {@link Reader} using a specified delimiter. + *

+ * {@code Stream} assumes that data is being pushed to the provided {@link Reader} asynchronously and utilizes a + * {@code Scanner} to block during iteration if the next object is not available. + * + * @param The type of objects in the stream. + */ +public final class Stream implements Iterable { + /** + * The {@link Class} of the objects in the stream. + */ + private final Class valueType; + /** + * The {@link Scanner} used for reading from the input stream and blocking when neede during iteration. + */ + private final Scanner scanner; + + /** + * Constructs a new {@code Stream} with the specified value type, reader, and delimiter. + * + * @param valueType The class of the objects in the stream. + * @param reader The reader that provides the streamed data. + * @param delimiter The delimiter used to separate elements in the stream. + */ + public Stream(Class valueType, Reader reader, String delimiter) { + this.scanner = new Scanner(reader).useDelimiter(delimiter); + this.valueType = valueType; + } + + /** + * Returns an iterator over the elements in this stream that blocks during iteration when the next object is + * not yet available. + * + * @return An iterator that can be used to traverse the elements in the stream. + */ + @Override + public Iterator iterator() { + return new Iterator() { + /** + * Returns {@code true} if there are more elements in the stream. + *

+ * Will block and wait for input if the stream has not ended and the next object is not yet available. + * + * @return {@code true} if there are more elements, {@code false} otherwise. + */ + @Override + public boolean hasNext() { + return scanner.hasNext(); + } + + /** + * Returns the next element in the stream. + *

+ * Will block and wait for input if the stream has not ended and the next object is not yet available. + * + * @return The next element in the stream. + * @throws NoSuchElementException If there are no more elements in the stream. + */ + @Override + public T next() { + if (!scanner.hasNext()) { + throw new NoSuchElementException(); + } else { + try { + T parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + scanner.next().trim(), valueType); + return parsedResponse; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + /** + * Removing elements from {@code Stream} is not supported. + * + * @throws UnsupportedOperationException Always, as removal is not supported. + */ + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/Suppliers.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/Suppliers.java new file mode 100644 index 00000000000..123a3902b21 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/core/Suppliers.java @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.core; + +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Supplier; + +public final class Suppliers { + private Suppliers() {} + + public static Supplier memoize(Supplier delegate) { + AtomicReference value = new AtomicReference<>(); + return () -> { + T val = value.get(); + if (val == null) { + val = value.updateAndGet(cur -> cur == null ? Objects.requireNonNull(delegate.get()) : cur); + } + return val; + }; + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/noheaders/NoHeadersClient.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/noheaders/NoHeadersClient.java new file mode 100644 index 00000000000..faf320094a8 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/noheaders/NoHeadersClient.java @@ -0,0 +1,57 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.resources.noheaders; + +import com.seed.literalHeaders.core.ApiError; +import com.seed.literalHeaders.core.ClientOptions; +import com.seed.literalHeaders.core.ObjectMappers; +import com.seed.literalHeaders.core.RequestOptions; +import java.io.IOException; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +public class NoHeadersClient { + protected final ClientOptions clientOptions; + + public NoHeadersClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + public void get() { + get(null); + } + + public void get(RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("no-headers") + .build(); + Request okhttpRequest = new Request.Builder() + .url(httpUrl) + .method("POST", RequestBody.create("", null)) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .build(); + try { + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions.getTimeout().isPresent()) { + client = client.newBuilder() + .readTimeout(requestOptions.getTimeout().get(), requestOptions.getTimeoutTimeUnit()) + .build(); + } + Response response = client.newCall(okhttpRequest).execute(); + if (response.isSuccessful()) { + return; + } + throw new ApiError( + response.code(), + ObjectMappers.JSON_MAPPER.readValue(response.body().string(), Object.class)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/onlyliteralheaders/OnlyLiteralHeadersClient.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/onlyliteralheaders/OnlyLiteralHeadersClient.java new file mode 100644 index 00000000000..1a903173a65 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/onlyliteralheaders/OnlyLiteralHeadersClient.java @@ -0,0 +1,57 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.resources.onlyliteralheaders; + +import com.seed.literalHeaders.core.ApiError; +import com.seed.literalHeaders.core.ClientOptions; +import com.seed.literalHeaders.core.ObjectMappers; +import com.seed.literalHeaders.core.RequestOptions; +import java.io.IOException; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +public class OnlyLiteralHeadersClient { + protected final ClientOptions clientOptions; + + public OnlyLiteralHeadersClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + public void get() { + get(null); + } + + public void get(RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("only-literal-headers") + .build(); + Request okhttpRequest = new Request.Builder() + .url(httpUrl) + .method("POST", RequestBody.create("", null)) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .build(); + try { + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions.getTimeout().isPresent()) { + client = client.newBuilder() + .readTimeout(requestOptions.getTimeout().get(), requestOptions.getTimeoutTimeUnit()) + .build(); + } + Response response = client.newCall(okhttpRequest).execute(); + if (response.isSuccessful()) { + return; + } + throw new ApiError( + response.code(), + ObjectMappers.JSON_MAPPER.readValue(response.body().string(), Object.class)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/withnonliteralheaders/WithNonLiteralHeadersClient.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/withnonliteralheaders/WithNonLiteralHeadersClient.java new file mode 100644 index 00000000000..422a11d1e05 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/withnonliteralheaders/WithNonLiteralHeadersClient.java @@ -0,0 +1,70 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.resources.withnonliteralheaders; + +import com.seed.literalHeaders.core.ApiError; +import com.seed.literalHeaders.core.ClientOptions; +import com.seed.literalHeaders.core.ObjectMappers; +import com.seed.literalHeaders.core.RequestOptions; +import com.seed.literalHeaders.resources.withnonliteralheaders.requests.WithNonLiteralHeadersRequest; +import java.io.IOException; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +public class WithNonLiteralHeadersClient { + protected final ClientOptions clientOptions; + + public WithNonLiteralHeadersClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + public void get(WithNonLiteralHeadersRequest request) { + get(request, null); + } + + public void get(WithNonLiteralHeadersRequest request, RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("with-non-literal-headers") + .build(); + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl) + .method("POST", RequestBody.create("", null)) + .headers(Headers.of(clientOptions.headers(requestOptions))); + _requestBuilder.addHeader("integer", Integer.toString(request.getInteger())); + if (request.getMaybeInteger().isPresent()) { + _requestBuilder.addHeader( + "maybeInteger", request.getMaybeInteger().get().toString()); + } + _requestBuilder.addHeader("literalServiceHeader", request.getLiteralServiceHeader()); + _requestBuilder.addHeader( + "trueServiceHeader", request.getTrueServiceHeader().toString()); + _requestBuilder.addHeader("nonLiteralEndpointHeader", request.getNonLiteralEndpointHeader()); + _requestBuilder.addHeader("literalEndpointHeader", request.getLiteralEndpointHeader()); + _requestBuilder.addHeader( + "trueEndpointHeader", request.getTrueEndpointHeader().toString()); + Request okhttpRequest = _requestBuilder.build(); + try { + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions.getTimeout().isPresent()) { + client = client.newBuilder() + .readTimeout(requestOptions.getTimeout().get(), requestOptions.getTimeoutTimeUnit()) + .build(); + } + Response response = client.newCall(okhttpRequest).execute(); + if (response.isSuccessful()) { + return; + } + throw new ApiError( + response.code(), + ObjectMappers.JSON_MAPPER.readValue(response.body().string(), Object.class)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/withnonliteralheaders/requests/WithNonLiteralHeadersRequest.java b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/withnonliteralheaders/requests/WithNonLiteralHeadersRequest.java new file mode 100644 index 00000000000..4de76adaae3 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/main/java/com/seed/literalHeaders/resources/withnonliteralheaders/requests/WithNonLiteralHeadersRequest.java @@ -0,0 +1,180 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders.resources.withnonliteralheaders.requests; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.seed.literalHeaders.core.ObjectMappers; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonDeserialize(builder = WithNonLiteralHeadersRequest.Builder.class) +public final class WithNonLiteralHeadersRequest { + private final int integer; + + private final Optional maybeInteger; + + private final String nonLiteralEndpointHeader; + + private final Map additionalProperties; + + private WithNonLiteralHeadersRequest( + int integer, + Optional maybeInteger, + String nonLiteralEndpointHeader, + Map additionalProperties) { + this.integer = integer; + this.maybeInteger = maybeInteger; + this.nonLiteralEndpointHeader = nonLiteralEndpointHeader; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("integer") + public int getInteger() { + return integer; + } + + @JsonProperty("maybeInteger") + public Optional getMaybeInteger() { + return maybeInteger; + } + + @JsonProperty("literalServiceHeader") + public String getLiteralServiceHeader() { + return "service header"; + } + + @JsonProperty("trueServiceHeader") + public Boolean getTrueServiceHeader() { + return true; + } + + @JsonProperty("nonLiteralEndpointHeader") + public String getNonLiteralEndpointHeader() { + return nonLiteralEndpointHeader; + } + + @JsonProperty("literalEndpointHeader") + public String getLiteralEndpointHeader() { + return "endpoint header"; + } + + @JsonProperty("trueEndpointHeader") + public Boolean getTrueEndpointHeader() { + return true; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof WithNonLiteralHeadersRequest && equalTo((WithNonLiteralHeadersRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(WithNonLiteralHeadersRequest other) { + return integer == other.integer + && maybeInteger.equals(other.maybeInteger) + && nonLiteralEndpointHeader.equals(other.nonLiteralEndpointHeader); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.integer, this.maybeInteger, this.nonLiteralEndpointHeader); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IntegerStage builder() { + return new Builder(); + } + + public interface IntegerStage { + NonLiteralEndpointHeaderStage integer(int integer); + + Builder from(WithNonLiteralHeadersRequest other); + } + + public interface NonLiteralEndpointHeaderStage { + _FinalStage nonLiteralEndpointHeader(String nonLiteralEndpointHeader); + } + + public interface _FinalStage { + WithNonLiteralHeadersRequest build(); + + _FinalStage maybeInteger(Optional maybeInteger); + + _FinalStage maybeInteger(Integer maybeInteger); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IntegerStage, NonLiteralEndpointHeaderStage, _FinalStage { + private int integer; + + private String nonLiteralEndpointHeader; + + private Optional maybeInteger = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(WithNonLiteralHeadersRequest other) { + integer(other.getInteger()); + maybeInteger(other.getMaybeInteger()); + nonLiteralEndpointHeader(other.getNonLiteralEndpointHeader()); + return this; + } + + @java.lang.Override + @JsonSetter("integer") + public NonLiteralEndpointHeaderStage integer(int integer) { + this.integer = integer; + return this; + } + + @java.lang.Override + @JsonSetter("nonLiteralEndpointHeader") + public _FinalStage nonLiteralEndpointHeader(String nonLiteralEndpointHeader) { + this.nonLiteralEndpointHeader = nonLiteralEndpointHeader; + return this; + } + + @java.lang.Override + public _FinalStage maybeInteger(Integer maybeInteger) { + this.maybeInteger = Optional.of(maybeInteger); + return this; + } + + @java.lang.Override + @JsonSetter(value = "maybeInteger", nulls = Nulls.SKIP) + public _FinalStage maybeInteger(Optional maybeInteger) { + this.maybeInteger = maybeInteger; + return this; + } + + @java.lang.Override + public WithNonLiteralHeadersRequest build() { + return new WithNonLiteralHeadersRequest( + integer, maybeInteger, nonLiteralEndpointHeader, additionalProperties); + } + } +} diff --git a/seed/java-sdk/literal-headers/src/test/java/com/seed/literalHeaders/TestClient.java b/seed/java-sdk/literal-headers/src/test/java/com/seed/literalHeaders/TestClient.java new file mode 100644 index 00000000000..8fa09ffa817 --- /dev/null +++ b/seed/java-sdk/literal-headers/src/test/java/com/seed/literalHeaders/TestClient.java @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.seed.literalHeaders; + +public final class TestClient { + public void test() { + // Add tests here and mark this file in .fernignore + assert true; + } +} diff --git a/seed/java-sdk/seed.yml b/seed/java-sdk/seed.yml index b09e99eafbf..c803826c958 100644 --- a/seed/java-sdk/seed.yml +++ b/seed/java-sdk/seed.yml @@ -25,11 +25,17 @@ fixtures: scripts: - docker: fernapi/java-seed commands: - - source "$HOME/.sdkman/bin/sdkman-init.sh" - - sdk use java 11.0.21-zulu - - gradle compileJava + - source ~/.bash_profile + - ./gradlew compileJava + # - jenv shell 1.8 && ./gradlew compileJava allowedFailures: - enum - extends - response-property + - examples + - exhaustive:local-files + - file-upload + - idempotency-headers + - trace + - undiscriminated-unions diff --git a/seed/pydantic/seed.yml b/seed/pydantic/seed.yml index 2fae535d232..7b219f3db25 100644 --- a/seed/pydantic/seed.yml +++ b/seed/pydantic/seed.yml @@ -12,3 +12,5 @@ fixtures: - customConfig: version: v2 outputFolder: pydantic-v2 +allowedFailures: + - websocket diff --git a/seed/python-sdk/literal-headers/src/seed/core/__init__.py b/seed/python-sdk/literal-headers/src/seed/core/__init__.py index 4c53b36cabd..63da8f9772d 100644 --- a/seed/python-sdk/literal-headers/src/seed/core/__init__.py +++ b/seed/python-sdk/literal-headers/src/seed/core/__init__.py @@ -3,7 +3,10 @@ from .api_error import ApiError from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper from .datetime_utils import serialize_datetime +<<<<<<< HEAD +======= from .file import File, convert_file_dict_to_httpx_tuples +>>>>>>> 7ef44666d6b7ec8a03df992a4d0522c741b0f67c from .jsonable_encoder import jsonable_encoder from .remove_none_from_dict import remove_none_from_dict from .request_options import RequestOptions @@ -12,10 +15,15 @@ "ApiError", "AsyncClientWrapper", "BaseClientWrapper", +<<<<<<< HEAD + "RequestOptions", + "SyncClientWrapper", +======= "File", "RequestOptions", "SyncClientWrapper", "convert_file_dict_to_httpx_tuples", +>>>>>>> 7ef44666d6b7ec8a03df992a4d0522c741b0f67c "jsonable_encoder", "remove_none_from_dict", "serialize_datetime", diff --git a/seed/python-sdk/seed.yml b/seed/python-sdk/seed.yml index e92258c0ece..40da9af90e5 100644 --- a/seed/python-sdk/seed.yml +++ b/seed/python-sdk/seed.yml @@ -29,16 +29,17 @@ fixtures: scripts: - docker: fernapi/python-seed commands: - - pyenv global 3.8 - - dmypy run . - - pyenv global 3.9 - - dmypy run . + # The global python version is 3.8 + # - mypy --cache-dir /tmp . --cache-fine-grained + # - eval "$(pyenv init -)" && pyenv shell 3.9 && mypy --cache-dir /tmp . --cache-fine-grained + - pyenv shell 3.9 + - poetry install + - poetry run mypy . allowedFailures: - response-property # Generator does not handle list of enums - enum - auth-environment-variables - bearer-token-environment-variable - - - + - websocket + - exhaustive:union-utils \ No newline at end of file diff --git a/seed/ruby-sdk/websocket/lib/requests.rb b/seed/ruby-sdk/websocket/lib/requests.rb index 3f538ac423d..1aba4272fe8 100644 --- a/seed/ruby-sdk/websocket/lib/requests.rb +++ b/seed/ruby-sdk/websocket/lib/requests.rb @@ -61,4 +61,26 @@ def initialize(additional_headers: nil, additional_query_parameters: nil, additi @timeout_in_seconds = timeout_in_seconds end end + + # Additional options for request-specific configuration when calling APIs via the SDK. + class IdempotencyRequestOptions + attr_reader :additional_headers, :additional_query_parameters, :additional_body_parameters, :timeout_in_seconds + + # @param additional_headers [Hash{String => Object}] + # @param additional_query_parameters [Hash{String => Object}] + # @param additional_body_parameters [Hash{String => Object}] + # @param timeout_in_seconds [Long] + # @return [IdempotencyRequestOptions] + def initialize(additional_headers: nil, additional_query_parameters: nil, additional_body_parameters: nil, + timeout_in_seconds: nil) + # @type [Hash{String => Object}] + @additional_headers = additional_headers + # @type [Hash{String => Object}] + @additional_query_parameters = additional_query_parameters + # @type [Hash{String => Object}] + @additional_body_parameters = additional_body_parameters + # @type [Long] + @timeout_in_seconds = timeout_in_seconds + end + end end diff --git a/seed/ts-sdk/seed.yml b/seed/ts-sdk/seed.yml index e2d4666f4e8..a11097fc812 100644 --- a/seed/ts-sdk/seed.yml +++ b/seed/ts-sdk/seed.yml @@ -84,11 +84,15 @@ fixtures: includeApiReference: true outputFolder: examples-with-api-reference scripts: - - docker: node:lts-slim + - docker: fernapi/ts-seed commands: - - yarn install - - yarn build + - yarn install && yarn build allowedFailures: - bytes - plain-text + - alias + - api-wide-base-path + - auth-environment-variables + - exhaustive:bundle + - exhaustive:dev-dependencies diff --git a/shared/.prettierignore b/shared/.prettierignore index cde214ec1cb..1b06c25239c 100644 --- a/shared/.prettierignore +++ b/shared/.prettierignore @@ -2,6 +2,7 @@ ../packages/seed/src/config/** ../scripts/** ../seed/** +../docker/seed/** **/*.yaml **/*.yml