You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a oneOf in a body schema, the rendered document shows MOD1 and MOD2 tabs, but neither actually renders the expected object.
Expected behavior
I'd expect to see an object that changes depending on the selected oneOf tab.
Current behavior
This is what's currently shown:
The body is not rendered.
However, if I remove the oneOf and move the properties to the body schema, everything renders as it should. In addition, Redoc shows the object as expected. So I believe this is a bug with this plugin, and not a problem with the schema.
Possible solution
Steps to reproduce
In an OAS 3.0 file, create an endpoint with this body schema and generate:
type: objectrequired:
- files
- restoreAccountIdoneOf:
- properties:
s3Target:
$ref: ./S3RestoreTarget.yamlrequired:
- s3Target
- properties:
storageAccountTarget:
$ref: ./StorageAccountRestoreTarget.yamlrequired:
- storageAccountTargetproperties:
restoreAccountId:
type: stringdescription: ID of the restore account.example: 1ee34dc5-0a7c-4e56-a820-917371e05c8dprefix:
type: stringdescription: | Prefix to add to the restore path. If you don't specify a prefix, the files are restored to their respective folders in the original file tree, starting from the root of the bucket.example: my-restore-prefix
S3RestoreTarget.yaml:
type: objectrequired:
- bucketNamedescription: | Information about the S3 bucket where you want to restore the files. If you don't specify a target, the files are restored to the original bucket.properties:
bucketName:
type: stringdescription: Name of an existing bucket to restore the files to.example: my-restore-bucket-12345encryptionKeyId:
type: stringdescription: ID of the key you want to use for encrypting the restored files.example: "arn:aws:kms:eu-central-1:123456789:key/1e61541a-5039-413a-b821-0f4f596b785b1514358"
StorageAccountRestoreTarget.yaml:
type: objectrequired:
- name
- containerdescription: | Information about the storage account where you want to restore the files. If you don't specify a target, the files are restored to the original storage account.properties:
name:
type: stringdescription: Name of the storage account to restore the files to.example: my-restore-storage-account-12345resourceGroup:
type: stringdescription: Name of the resource group that contains the storage account.example: my-restore-resource-group-12345container:
type: stringdescription: Name of the container in the storage account to restore the files to.example: my-restore-container-12345
Screenshots
(see screenshot above for how the plugin renders)
As an example of appropriate rendering, this video shows how it's rendered when creating a static html file with Redocly CLI:
2024-12-31_15-22-06.mp4
Context
There's really no additional context here; it's just that the output isn't as expected.
Your Environment
Version used: I tried on both 4.3.0 and 4.3.1, with Docusaurus 3.6.3.
Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
Arc Version 1.74.0 (57065)
Chromium Engine Version 131.0.6778.205
Node v20.14.0
Operating System and version (desktop or mobile): Desktop, macOS Sequoia 15.1.1
Link to your project: (private, no link available. Can provide redacted source if needed.)
The text was updated successfully, but these errors were encountered:
Describe the bug
When using a oneOf in a body schema, the rendered document shows MOD1 and MOD2 tabs, but neither actually renders the expected object.
Expected behavior
I'd expect to see an object that changes depending on the selected oneOf tab.
Current behavior
This is what's currently shown:
The body is not rendered.
However, if I remove the oneOf and move the properties to the body schema, everything renders as it should. In addition, Redoc shows the object as expected. So I believe this is a bug with this plugin, and not a problem with the schema.
Possible solution
Steps to reproduce
In an OAS 3.0 file, create an endpoint with this body schema and generate:
S3RestoreTarget.yaml
:StorageAccountRestoreTarget.yaml
:Screenshots
(see screenshot above for how the plugin renders)
As an example of appropriate rendering, this video shows how it's rendered when creating a static html file with Redocly CLI:
2024-12-31_15-22-06.mp4
Context
There's really no additional context here; it's just that the output isn't as expected.
Your Environment
The text was updated successfully, but these errors were encountered: