-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9576a81
commit 15aa967
Showing
7 changed files
with
353 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: fern | ||
auth: bearer | ||
environments: | ||
Production: https://api.buildwithfern.com | ||
default-environment: Production | ||
error-discrimination: | ||
strategy: property | ||
property-name: error | ||
audiences: | ||
- external |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json | ||
|
||
types: | ||
ApiDefinitionId: uuid | ||
|
||
OrgId: | ||
type: string | ||
docs: Human readable org id (e.g. fern) | ||
|
||
ApiId: | ||
type: string | ||
docs: Human readable api identifier (e.g. venus) | ||
|
||
DocsConfigId: | ||
type: string | ||
docs: The ID of a particular docs config. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,290 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json | ||
|
||
imports: | ||
commons: commons.yml | ||
|
||
service: | ||
auth: true | ||
base-path: /snippets | ||
endpoints: | ||
get: | ||
path: "" | ||
docs: Get snippet by endpoint method and path | ||
display-name: Get snippet for endpoint | ||
availability: pre-release | ||
audiences: | ||
- external | ||
- fiddle | ||
method: POST | ||
request: | ||
name: GetSnippetRequest | ||
body: | ||
properties: | ||
orgId: | ||
type: optional<commons.OrgId> | ||
docs: | | ||
If the same API is defined across multiple organization, | ||
you must specify an organization ID. | ||
apiId: | ||
type: optional<commons.ApiId> | ||
docs: | | ||
If you have more than one API, you must specify its ID. | ||
sdks: | ||
type: optional<list<SDK>> | ||
docs: | | ||
The SDKs for which to load snippets. If unspecified, | ||
snippets for the latest published SDKs will be returned. | ||
loadLevel: | ||
type: optional<SnippetLoadLevel> | ||
docs: | | ||
The level of detail to load for the snippet. If unspecified, | ||
the full snippet will be returned. | ||
endpoint: EndpointIdentifier | ||
response: list<Snippet> | ||
examples: | ||
- request: | ||
endpoint: | ||
method: GET | ||
path: /v1/search | ||
response: | ||
body: | ||
- type: python | ||
sdk: | ||
package: vellum-ai | ||
version: 1.2.1 | ||
sync_client: | | ||
import Vellum from vellum.client | ||
client = Vellum(api_key="YOUR_API_KEY") | ||
client.search(query="Find documents written in the last 5 days") | ||
async_client: | | ||
import VellumAsync from vellum.client | ||
client = VellumAsync(api_key="YOUR_API_KEY") | ||
await client.search(query="Find documents written in the last 5 days") | ||
- type: typescript | ||
sdk: | ||
package: vellum-ai | ||
version: 1.2.1 | ||
client: | | ||
import { VellumClient } from "vellum-ai"; | ||
const vellum = VellumClient({ | ||
apiKey="YOUR_API_KEY" | ||
}) | ||
vellum.search({ | ||
query: "Find documents written in the last 5 days" | ||
}) | ||
load: | ||
path: /load | ||
display-name: Load all snippets | ||
method: POST | ||
availability: pre-release | ||
audiences: | ||
- external | ||
- fiddle | ||
request: | ||
name: ListSnippetsRequest | ||
query-parameters: | ||
page: optional<integer> | ||
body: | ||
properties: | ||
orgId: | ||
type: optional<commons.OrgId> | ||
docs: | | ||
If the same API is defined across multiple organization, | ||
you must specify an organization ID. | ||
apiId: | ||
type: optional<commons.ApiId> | ||
docs: | | ||
If you have more than one API, you must specify its ID. | ||
sdks: | ||
type: optional<list<SDK>> | ||
docs: | | ||
The SDKs for which to load snippets. If unspecified, | ||
snippets for the latest published SDKs will be returned. | ||
loadLevel: | ||
type: optional<SnippetLoadLevel> | ||
docs: | | ||
The level of detail to load for the snippet. If unspecified, | ||
the full snippet will be returned. | ||
response: SnippetsPage | ||
examples: | ||
- query-parameters: | ||
page: 1 | ||
request: | ||
orgId: vellum | ||
apiId: vellum-ai | ||
sdks: | ||
- type: python | ||
package: vellum-ai | ||
version: 1.2.1 | ||
response: | ||
body: | ||
next: 2 | ||
snippets: | ||
/v1/search: | ||
GET: | ||
- type: python | ||
sdk: | ||
package: vellum-ai | ||
version: 1.2.1 | ||
sync_client: | | ||
import Vellum from vellum.client | ||
client = Vellum(api_key="YOUR_API_KEY") | ||
client.search(query="Find documents written in the last 5 days") | ||
async_client: | | ||
import Vellum from vellum.client | ||
client = Vellum(api_key="YOUR_API_KEY") | ||
client.search(query="Find documents written in the last 5 days") | ||
- type: typescript | ||
sdk: | ||
package: vellum-ai | ||
version: 1.2.1 | ||
client: | | ||
import { VellumClient } from "vellum-ai"; | ||
const vellum = VellumClient({ | ||
apiKey="YOUR_API_KEY" | ||
}) | ||
vellum.search({ | ||
query: "Find documents written in the last 5 days" | ||
}) | ||
v1/document-indexes: | ||
POST: | ||
- type: python | ||
sdk: | ||
package: vellum-ai | ||
version: 1.2.1 | ||
sync_client: | | ||
import Vellum from vellum.client | ||
client = Vellum(api_key="YOUR_API_KEY") | ||
client.document_indexes.create(name="meeting-reports", status="ACTIVE") | ||
async_client: | | ||
import VellumAsync from vellum.client | ||
client = VellumAsync(api_key="YOUR_API_KEY") | ||
await client.document_indexes.create(name="meeting-reports", status="ACTIVE") | ||
- type: typescript | ||
sdk: | ||
package: vellum-ai | ||
version: 1.2.1 | ||
client: | | ||
import { VellumClient } from "vellum-ai"; | ||
const vellum = VellumClient({ | ||
apiKey="YOUR_API_KEY" | ||
}) | ||
vellum.documentIndexes.create({ | ||
name: "meeting-reports", | ||
status: "ACTIVE" | ||
}) | ||
types: | ||
SnippetLoadLevel: | ||
enum: | ||
- value: full | ||
docs: | | ||
The full snippet including client instantiation and method call. | ||
- value: endpoint | ||
docs: | | ||
Only returns the part of the snippet for the endpoint call. In | ||
other words, the client instantiation is not included. | ||
EndpointIdentifier: | ||
properties: | ||
path: EndpointPath | ||
method: EndpointMethod | ||
|
||
EndpointPath: | ||
type: string | ||
docs: The relative path for an endpont (e.g. `/users/{userId}`) | ||
|
||
EndpointMethod: | ||
enum: | ||
- PUT | ||
- POST | ||
- GET | ||
- PATCH | ||
- DELETE | ||
|
||
SDK: | ||
union: | ||
typescript: TypeScriptSDK | ||
python: PythonSDK | ||
go: GoSDK | ||
java: JavaSDK | ||
|
||
TypeScriptSDK: | ||
properties: | ||
package: string | ||
version: string | ||
|
||
PythonSDK: | ||
properties: | ||
package: string | ||
version: string | ||
|
||
GoSDK: | ||
properties: | ||
githubRepo: string | ||
version: string | ||
|
||
JavaSDK: | ||
properties: | ||
group: | ||
type: string | ||
docs: The maven repository group (e.g. `com.stripe.java`) | ||
artifact: | ||
type: string | ||
docs: The artifact (e.g. `stripe-java`) | ||
version: string | ||
|
||
####### Load Snippets ####### | ||
|
||
SnippetsPage: | ||
properties: | ||
next: | ||
type: optional<integer> | ||
docs: If present, pass this into the `page` query parameter to load the next page. | ||
snippets: | ||
type: map<EndpointPath, SnippetsByEndpointMethod> | ||
docs: | | ||
The snippets are returned as a map of endpoint path (e.g. `/api/users`) | ||
to a map of endpoint method (e.g. `POST`) to snippets. | ||
SnippetsByEndpointMethod: | ||
type: map<EndpointMethod, list<Snippet>> | ||
|
||
Snippet: | ||
union: | ||
typescript: TypeScriptSnippet | ||
python: PythonSnippet | ||
java: JavaSnippet | ||
go: GoSnippet | ||
|
||
TypeScriptSnippet: | ||
properties: | ||
sdk: TypeScriptSDK | ||
client: string | ||
|
||
PythonSnippet: | ||
properties: | ||
sdk: PythonSDK | ||
async_client: string | ||
sync_client: string | ||
|
||
GoSnippet: | ||
properties: | ||
sdk: GoSDK | ||
client: string | ||
|
||
JavaSnippet: | ||
properties: | ||
sdk: JavaSDK | ||
async_client: string | ||
sync_client: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"organization" : "fern", | ||
"version" : "0.0.86" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
groups: | ||
node-sdk: | ||
audiences: | ||
- external | ||
generators: | ||
- name: fernapi/fern-typescript-node-sdk | ||
version: 0.9.2 | ||
output: | ||
location: npm | ||
package-name: '@fern-api/node-sdk' | ||
token: ${NPM_TOKEN} | ||
github: | ||
repository: fern-api/node-sdk | ||
license: MIT | ||
config: | ||
namespaceExport: Fern | ||
python-sdk: | ||
audiences: | ||
- external | ||
generators: | ||
- name: fernapi/fern-python-sdk | ||
version: 0.12.1 | ||
output: | ||
location: pypi | ||
package-name: fern-api | ||
# token: ${PYPI_TOKEN} | ||
github: | ||
repository: fern-api/python-sdk | ||
license: MIT | ||
config: | ||
client_class_name: Fern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters