Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ export function parseAsyncAPIV2({
context.namespace
),
description: resolvedSchema.description,
parameterNameOverride: undefined,
parameterNameOverride: getExtension<string>(
resolvedSchema,
FernOpenAPIExtension.PARAMETER_NAME
),
availability: convertAvailability(resolvedSchema),
source,
explode: undefined
Expand All @@ -206,7 +209,7 @@ export function parseAsyncAPIV2({
context.namespace
),
description: schema.description,
parameterNameOverride: undefined,
parameterNameOverride: getExtension<string>(schema, FernOpenAPIExtension.PARAMETER_NAME),
availability: convertAvailability(schema),
source,
explode: undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export function parseAsyncAPIV3({
const parameterObject = {
name: parameterKey,
description: resolvedParameter.description,
parameterNameOverride: undefined,
parameterNameOverride: getExtension<string>(resolvedParameter, FernOpenAPIExtension.PARAMETER_NAME),
schema: parameterSchema,
variableReference: undefined,
availability: convertAvailability(parameter),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
{
"servers": [],
"websocketServers": [
{
"name": "API",
"url": "wss://api.example.com/v1/ws"
}
],
"tags": {
"tagsById": {}
},
"hasEndpointsMarkedInternal": false,
"endpoints": [],
"webhooks": [],
"channels": {
"/chat": {
"audiences": [],
"handshake": {
"headers": [],
"queryParameters": [
{
"name": "session_settings",
"schema": {
"generatedName": "WebsocketSessionSettings",
"description": "The session settings for the connection.",
"value": {
"description": "The session settings for the connection.",
"schema": {
"type": "string"
},
"generatedName": "WebsocketSessionSettings",
"groupName": [],
"type": "primitive"
},
"groupName": [],
"type": "optional"
},
"description": "The session settings for the connection.",
"parameterNameOverride": "connect_session_settings",
"source": {
"file": "../asyncapi.yml",
"type": "openapi"
}
},
{
"name": "api_key",
"schema": {
"description": "The API key for authentication.",
"schema": {
"type": "string"
},
"generatedName": "WebsocketApiKey",
"groupName": [],
"type": "primitive"
},
"description": "The API key for authentication.",
"source": {
"file": "../asyncapi.yml",
"type": "openapi"
}
},
{
"name": "model_version",
"schema": {
"generatedName": "WebsocketModelVersion",
"description": "The model version to use.",
"value": {
"description": "The model version to use.",
"schema": {
"type": "string"
},
"generatedName": "WebsocketModelVersion",
"groupName": [],
"type": "primitive"
},
"groupName": [],
"type": "optional"
},
"description": "The model version to use.",
"parameterNameOverride": "version",
"source": {
"file": "../asyncapi.yml",
"type": "openapi"
}
}
],
"pathParameters": []
},
"groupName": [
"/chat"
],
"messages": [],
"servers": [
{
"name": "API",
"url": "wss://api.example.com/v1/ws"
}
],
"path": "/chat",
"examples": [
{
"queryParameters": [],
"headers": [],
"messages": []
}
],
"source": {
"file": "../asyncapi.yml",
"type": "openapi"
}
}
},
"groupedSchemas": {
"rootSchemas": {
"SendPayload": {
"properties": [
{
"key": "text",
"schema": {
"generatedName": "SendPayloadText",
"schema": {
"type": "string"
},
"description": "The text to send",
"groupName": [],
"type": "primitive"
},
"audiences": [],
"conflict": {},
"generatedName": "sendPayloadText"
}
],
"generatedName": "SendPayload",
"allOf": [],
"allOfPropertyConflicts": [],
"groupName": [],
"fullExamples": [],
"additionalProperties": false,
"source": {
"file": "../asyncapi.yml",
"type": "openapi"
},
"type": "object"
},
"ReceivePayload": {
"properties": [
{
"key": "response",
"schema": {
"generatedName": "ReceivePayloadResponse",
"schema": {
"type": "string"
},
"description": "The response text",
"groupName": [],
"type": "primitive"
},
"audiences": [],
"conflict": {},
"generatedName": "receivePayloadResponse"
}
],
"generatedName": "ReceivePayload",
"allOf": [],
"allOfPropertyConflicts": [],
"groupName": [],
"fullExamples": [],
"additionalProperties": false,
"source": {
"file": "../asyncapi.yml",
"type": "openapi"
},
"type": "object"
}
},
"namespacedSchemas": {}
},
"variables": {},
"nonRequestReferencedSchemas": {},
"securitySchemes": {},
"globalHeaders": [],
"idempotencyHeaders": [],
"groups": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"absoluteFilePath": "/DUMMY_PATH",
"importedDefinitions": {},
"namedDefinitionFiles": {
"__package__.yml": {
"absoluteFilepath": "/DUMMY_PATH",
"contents": {
"types": {
"ReceivePayload": {
"docs": undefined,
"inline": undefined,
"properties": {
"response": {
"docs": "The response text",
"type": "string",
},
},
"source": {
"openapi": "../asyncapi.yml",
},
},
"SendPayload": {
"docs": undefined,
"inline": undefined,
"properties": {
"text": {
"docs": "The text to send",
"type": "string",
},
},
"source": {
"openapi": "../asyncapi.yml",
},
},
},
},
"rawContents": "types:
SendPayload:
properties:
text:
type: string
docs: The text to send
source:
openapi: ../asyncapi.yml
ReceivePayload:
properties:
response:
type: string
docs: The response text
source:
openapi: ../asyncapi.yml
",
},
"chat.yml": {
"absoluteFilepath": "/DUMMY_PATH",
"contents": {
"channel": {
"auth": false,
"examples": [
{
"messages": [],
},
],
"messages": {},
"path": "/chat",
"query-parameters": {
"api_key": {
"docs": "The API key for authentication.",
"type": "string",
},
"model_version": {
"docs": "The model version to use.",
"name": "version",
"type": "optional<string>",
},
"session_settings": {
"docs": "The session settings for the connection.",
"name": "connect_session_settings",
"type": "optional<string>",
},
},
"url": "API",
},
},
"rawContents": "channel:
path: /chat
url: API
auth: false
query-parameters:
session_settings:
type: optional<string>
docs: The session settings for the connection.
name: connect_session_settings
api_key:
type: string
docs: The API key for authentication.
model_version:
type: optional<string>
docs: The model version to use.
name: version
messages: {}
examples:
- messages: []
",
},
},
"packageMarkers": {},
"rootApiFile": {
"contents": {
"default-environment": "API",
"default-url": "Base",
"environments": {
"API": "wss://api.example.com/v1/ws",
},
"error-discrimination": {
"strategy": "status-code",
},
"name": "api",
},
"defaultUrl": "Base",
"rawContents": "name: api
error-discrimination:
strategy: status-code
environments:
API: wss://api.example.com/v1/ws
default-environment: API
default-url: Base
",
},
}
Loading
Loading