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
18 changes: 18 additions & 0 deletions openapi/components/paths/instances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$ref: ../responses/MissingCredentialsError.yaml
/instances/recent:
get:
operationId: getRecentLocations

Check notice on line 31 in openapi/components/paths/instances.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-operation-id

Operation returns an array, consider renaming to listRecentLocations.
summary: List Recent Locations
description: |-
Returns a list of recently visited locations.
Expand Down Expand Up @@ -61,8 +61,8 @@
security:
- authCookie: []
responses:
"200":
$ref: ../responses/instances/InstanceResponse.yaml

Check warning on line 65 in openapi/components/paths/instances.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-title

Schema must have a non-empty title.

Check warning on line 65 in openapi/components/paths/instances.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-description

Cannot be empty.
"401":
$ref: ../responses/MissingCredentialsError.yaml
"404":
Expand All @@ -84,10 +84,28 @@
- {}
- authCookie: []
responses:
"200":
$ref: ../responses/instances/InstanceResponse.yaml

Check warning on line 88 in openapi/components/paths/instances.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-title

Schema must have a non-empty title.

Check warning on line 88 in openapi/components/paths/instances.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-description

Cannot be empty.
"401":
$ref: ../responses/MissingCredentialsError.yaml
put:
operationId: updateInstance
summary: Update Instance
description: Set or remove the calendar event linked to an instance.
tags:
- instances
requestBody:
content:
application/json:
schema:
$ref: ../requests/UpdateInstanceRequest.yaml
Comment on lines +97 to +101
security:
- authCookie: []
responses:
"200":
$ref: ../responses/instances/InstanceResponse.yaml

Check warning on line 106 in openapi/components/paths/instances.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-title

Schema must have a non-empty title.

Check warning on line 106 in openapi/components/paths/instances.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-description

Cannot be empty.
"400":
$ref: ../responses/RequestValidationError.yaml
Comment on lines +102 to +108
delete:
operationId: closeInstance
summary: Close Instance
Expand Down Expand Up @@ -115,8 +133,8 @@
security:
- authCookie: []
responses:
"200":
$ref: ../responses/instances/InstanceResponse.yaml

Check warning on line 137 in openapi/components/paths/instances.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-title

Schema must have a non-empty title.

Check warning on line 137 in openapi/components/paths/instances.yaml

View workflow job for this annotation

GitHub Actions / lint

vrc-description

Cannot be empty.
"401":
$ref: ../responses/MissingCredentialsError.yaml
"403":
Expand Down
7 changes: 7 additions & 0 deletions openapi/components/requests/UpdateInstanceRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: UpdateInstanceRequest
type: object
properties:
calendarEntryId:
type: string
description: Calendar event to link to the instance. Send null to remove the current link.
nullable: true
81 changes: 81 additions & 0 deletions test/arazzo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,71 @@ workflows:
outputs:
calendarId: $response.body#/id

- stepId: create-instance
x-security:
- schemeName: authCookie
values:
apiKey: $workflows.session.outputs.sessionToken
operationId: $sourceDescriptions.default.createInstance
requestBody:
contentType: application/json
payload:
worldId: wrld_4cf554b4-430c-4f8f-b53e-1f294eed230b
type: group
region: use
ownerId: $steps.create-group.outputs.groupId
groupAccessType: members
successCriteria:
- condition: $statusCode == 200
onFailure:
- name: stop
type: end

outputs:
instanceId: $response.body#/instanceId

- stepId: link-instance-event
x-security:
- schemeName: authCookie
values:
apiKey: $workflows.session.outputs.sessionToken
operationId: $sourceDescriptions.default.updateInstance
parameters:
- name: worldId
in: path
value: wrld_4cf554b4-430c-4f8f-b53e-1f294eed230b
Comment on lines +1364 to +1373
- name: instanceId
in: path
value: $steps.create-instance.outputs.instanceId
requestBody:
contentType: application/json
payload:
calendarEntryId: $steps.create-event.outputs.calendarId
successCriteria:
- condition: $statusCode == 200
- condition: $response.body#/calendarEntryId == $steps.create-event.outputs.calendarId

- stepId: unlink-instance-event
x-security:
- schemeName: authCookie
values:
apiKey: $workflows.session.outputs.sessionToken
operationId: $sourceDescriptions.default.updateInstance
parameters:
- name: worldId
in: path
value: wrld_4cf554b4-430c-4f8f-b53e-1f294eed230b
- name: instanceId
in: path
value: $steps.create-instance.outputs.instanceId
requestBody:
contentType: application/json
payload:
calendarEntryId: null
successCriteria:
- condition: $statusCode == 200
- condition: $response.body#/calendarEntryId == null

- stepId: calendar-events
x-security:
- schemeName: authCookie
Expand Down Expand Up @@ -1513,6 +1578,22 @@ workflows:
successCriteria:
- condition: $statusCode == 404

- stepId: close-instance
x-security:
- schemeName: authCookie
values:
apiKey: $workflows.session.outputs.sessionToken
Comment on lines +1581 to +1585
operationId: $sourceDescriptions.default.closeInstance
parameters:
- name: worldId
in: path
value: wrld_4cf554b4-430c-4f8f-b53e-1f294eed230b
- name: instanceId
in: path
value: $steps.create-instance.outputs.instanceId
successCriteria:
- condition: $statusCode == 200

- stepId: delete-group
x-security:
- schemeName: authCookie
Expand Down
Loading