redocly / redocly-vs-code Goto Github PK
View Code? Open in Web Editor NEWRedocly VS Code extension
Redocly VS Code extension
What happened?
I'm getting an error mark in an yaml containing only components
What should have happened instead?
The missing server rule must be applied only when paths (or webhook?) are present.
Also, I'm getting never used
warnings for all schemas in this case.
Minimal reproducible OpenAPI snippet
openapi: 3.1.0
info:
title: Common Schemas
version: "latest"
components:
schemas:
BusinessUnit:
title: BusinessUnit
type: object
properties:
id:
type: integer
format: int32
description:
type: string
If possible, include a short example of your OpenAPI definition that we can use to simulate the problem.
Additional context
Release 0.3.3 (2023-11-16)
What happened?
I've got a problem "Every API should have security defined on the root level or for each operation" after loading a typical example found on the web (e.g. petstore.yaml). So far so good, because the yaml in fact does have this exact characteristic.
But the attributes of such finding are broken:
security
field to every single operation.What should have happened instead?
security
field) unerlined in yellowsecurity
field should not be underlined.Minimal reproducible OpenAPI snippet
openapi: "3.0.0"
info:
paths:
/pets:
get:
responses:
"200":
Screenshots
Additional context
Happens on "3.0.0" and "3.1.0".
Today's version of the plugin from VS Code Marketplace: 2022-10-25.
https://github.com/Redocly/openapi-starter/tree/main/openapi/paths#drawbacks-2
it is possible to use this way
$ref: '#/definitions/components/schemas/Error.yaml'
but extension shows error even though in preview it works
What should we improve?
Users can have several projects in vs code workspace . Each project can have its own configuration file. The goal is to find the correct configuration depending on the file selected by the user and highlight errors and warnings in OpenAPI definition files according to the configuration
How should we improve it?
The extension should select the root folder and look for the configuration file there depending on the file opened by the user
Why should we improve it?
Currently, the extension does not work correctly with Multi-root Workspaces
Describe alternatives you've considered
To do nothing
Additional context
What should we improve?
Since introducing changes to the redocly.yaml
config structure we can apply different lint rules to different files. The goal is to highlight errors and warnings in OpenAPI definition files according to the lint rules defined for them. The open question remains which lint config to use for files that are used in different root files via $ref
reference.
How should we improve it?
VS Code should indicate which apis
alias the current file is referring to and apply the appropriate lint config. In case there's more than one alias using the same root file it should apply the first alias from the apis
section.
Why should we improve it?
It would help users understand how the specific config applies to different API definitions.
Describe alternatives you've considered
None
Additional context
This change is related to the OpenAPI CLI core package and most of the code should be implemented there. However, most of the changes are VS Code extension specific and should be implemented from the perspective of VS Code.
What happened?
I have a large set of headers defined as components
. It seems only some of the headers will produce an error for not expected here
.
My JSON schema is valid and consistent with all other headers using a similar schema.
Minimal reproducible OpenAPI snippet
{
"components": {
"parameters": {
"header_Content-Language": {
"name": "Content-Language",
"in": "header",
"description": "Specifies the languages for which the entity-body is intended ",
"required": false,
"schema": {
"type": "string"
}
},
"header_Location": {
"name": "Location",
"in": "header",
"description": "Used to redirect the recipient to a location other the request URI for completion of the request or identification of a new resource",
"required": false,
"schema": {
"$ref": "../../../common/uriType_v01.json"
}
}
}
}
}
Screenshots
Example of the error produced
Example of a valid component schema
Additional Content
Version: 1.65.2 (user setup)
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:33:55.248Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042
What happened?
I changed a custom rule. In VS Code with the extension v0.2.3 the problem error highlight still happens even though I changed the rule. I run openapi lint
and confirm there are no errors. It feels like the custom plugin was cached somehow.
What should have happened instead?
The changed custom plugin should be evaluated.
A clear and concise description of the behavior you expected to happen.
Minimal reproducible OpenAPI snippet
What should we improve?
Use reference docs from npm registry instead of bundled local file.
A clear and concise description of desired behavior for the feature.
Dont keep bundled reference-docs package but get it by npm i
.
Why should we improve it?
It will be easier to update version of reference-docs. Because currently every update of ref docs requires changes to it.
What happened?
I added this configurable rule, as mentioned here: Redocly/redocly-cli#1225
rule/restful-paths:
subject:
type: Paths
assertions:
notPattern: '/[^{/}]+/[^{/}]+/'
message: Two consecutive path segments don't have a variable
It does not report a problem, when running lint
reports 22 problems.
What should have happened instead?
I expect to see the 22 problems.
Minimal reproducible OpenAPI snippet
Contact me.
Screenshots
n/a
Additional context
OAS 3.1, Redocly CLI 1.0.2.
What happened?
I was writing properties.
type: object
properties:
myPropName:
type:
When I selected type I ended up with type:
without a trailing space and yaml requires a space after a colon.
This is medium priority because of the frequency (this will happen to me about 100 times today).
This same issue happens with other selections too such as default:
etc...
What should have happened instead?
The extension should have had a space. Also, when the space is there, there is a menu to autocomplete the type (e.g. string).
Minimal reproducible OpenAPI snippet
See above.
Screenshots
Short video snippet:
Additional context
v0.2.9
What happened?
Error showing up with OpenAPI version
openapi: 3.0.1
String does not match the pattern of "^3\.1\.\d+(-.+)?$".yaml-schema: openapi.json
What should have happened instead?
Should accept the version of 3.0.1
Minimal reproducible OpenAPI snippet
openapi: 3.0.1
If possible, include a short example of your OpenAPI definition that we can use to simulate the problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Hi! Sorry aware this probably isnt a bug, but have trawled through docs and cant find where to set the OpenAPI version - really sorry if this is an obvious configuration error/ fix
Add any other information about the problem here, like: the extension version number; OpenAPI version you're using in your definition; your operating system.
What happened?
When adding a new key to the operation autocompletes added too much spaces.
What should have happened instead?
Minimal reproducible OpenAPI snippet
/user:
post:
tags:
- user
summary: Create user
description: This can only be done by the logged in user.
operationId: createUser
responses:
default:
description: successful operation
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: Created user object
required: true
What should we improve?
Make HTTP/HTTPS requests via http_proxy
and https_proxy
How should we improve it?
Not known yet
Why should we improve it?
In my company, everything has to be through the IT proxy.
After entering my API key and click Submit
, I can see the following error messages:
ar [FetchError]: request to https://api.redoc.ly/registry failed, reason: connect ETIMEDOUT 18.208.49.27:443
at ClientRequest.<anonymous> (/data/home/jizu/.vscode-server/extensions/redocly.openapi-vs-code-0.2.3/out/server/src/server.js:60:306517)
at ClientRequest.emit (events.js:327:22)
at ClientRequest.EventEmitter.emit (domain.js:467:12)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:315:20)
at TLSSocket.EventEmitter.emit (domain.js:467:12)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
type: 'system',
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT'
}
Describe alternatives you've considered
Additional context
What happened?
When I have no internet connection, my docs preview in VSCode doesn't work. It tells me to enter a login token.
What should have happened instead?
I expected to have a preview of my docs, like I do using redocly preview-docs
What happened?
When trying to autocomplete theme.openapi
in the redocly.yaml file, it get's appended with the 3.1.0
string despite it should be an object.
What should have happened instead?
The extension should not populate theme.openapi
with a string.
Screenshots
The customer reported the following:
Plugin opens several tabs and when I go between them, the pages turn white and I have to close and reopen the plugin:
The issues happens in MacOS.
When the user is opening the preview everting works fine, but if he is trying go to another file using ref+ cmd button, the preview turns to white.
For example, if there is a ref in the file and he is trying to use the command on the ref, the preview turns to white.
Minimal reproducible OpenAPI snippet
You can replicate this issue by splitting a sample petstore definition and further trying to navigate to any path using CMD + click
What happened?
Recently, the VS Code output is not formatted correctly. I'm not sure exactly when it started, but it seems to have been from last week.. 03/10/23+
openapi: 3.0.3
info:
title: blah
version: 1.1.0
paths:
/test/api:
get:
parameters:
- name: jeremy
in: query
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "../../../common/shared/confirm-message-schema_v03.json"
post:
requestBody:
$ref: "#/components/requestBodies/jeremy"
responses:
"201":
content:
application/json:
schema:
$ref: "schemas/test-schema_v01.json"
examples:
example:
externalValue: "./examples/example.json"
example1:
$ref: "./not-schemas/test-schema_v01.json"
components:
requestBodies:
jeremy:
required: true
content:
application/json:
schema:
$ref: "./common/shared/-schema_v01.json"
schemas:
jeremy:
type: object
properties:
test:
$ref: "jeremy-test"
Screenshots
two diff examples of output from different files.
Additional context
Last released
2023-9-20, 10:16:31
Last updated
2023-9-20, 20:18:54
It's my understanding the extension is using openapi core. VSC is reporting the extension was last updated on March 24, 2022 but there has been at least 5 newer releases on the openapi core package at time of writing. Is the VSC extension in sync with the other package? I've also noticed and created an issue on the redoc repo to synchronize the demo-bundle.js. @AlexVarchuk has been responding there.
Redocly/redoc#1896
What happened?
The cursor context breaks after I go to operation servers (as opposed to global root-level servers).
What should have happened instead?
It should show servers cursor context similar to as in the document root.
A clear and concise description of the behavior you expected to happen.
Minimal reproducible OpenAPI snippet
servers:
- url: https://ec.europa.eu/commission/presscorner/api
summary: Get document by reference
operationId: getDocument
parameters:
- name: reference
in: query
schema:
type: string
description: The topic reference
example: IP/22/1649
- name: language
in: query
schema:
type: string
maxLength: 2
description: The language code
example: en
- name: ts
in: query
schema:
type: integer
description: The timestamp in milliseconds
example: 1647099339234
responses:
200:
content:
application/json:
schema:
type: object
description: OK
Additional context
0.2.6
What should we improve?
Currently we only support redocly.yaml
file located in the root folder as the Redocly config file for VS Code.
We want to allow using different config files (similarly as we do in Redocly CLI using --config
option).
How should we improve it?
We could either:
redocly.yaml
fileWhy should we improve it?
Users might use monorepo structure (or any other complex file structure).
Describe alternatives you've considered
Doing nothing. Users may move their redocly.yaml
files to the root level (or use a symlink to the actual config file).
What happened?
Cursor Context
Go to root
which display context from Open API.What should have happened instead?
Go to root
button should be disable or display context by file or add placeholder.
When trying to preview the documentation for an OpenAPI Document complying to the version 3.1.0 of the spec with empty paths, an error is shown.
Can you please check this? Thanks in advance.
The OpenAPI Document I'm trying to render:
openapi: 3.1.0
info:
title: Book Shelf API
description: An API to keep track of Books
version: "0.1"
contact:
name: API Designer
license:
url: https://opensource.org/licenses/MIT
name: MIT
servers:
- url: http://api.bookshelf.com
paths: {}
The API metadata is rendered.
This error is show:
Something went wrong...
Cannot read properties of undefined (reading 'type')
Stack trace
(...)
According to the spec, a document with an empty paths is a valid one:
The Paths MAY be empty, due to Access Control List (ACL) constraints.
(source: https://spec.openapis.org/oas/v3.1.0#paths-object)
Leaving the paths empty can be useful for API Designers that want to describe only the contact information or the API Security requirements.
The Redoc Interactive Demo seems to handle this correctly, rendering the API metadata.
What happened?
When using exclusiveMinimum
and exclusiveMaximum
properties with OAS v3, the validator marks its usage as an error, saying its value should be a boolean. However, since OAS v3 this field now holds the actual (exclusive) minimum/maximum value, and is no longer a boolean.
What should have happened instead?
An integer or float should be accepted as the value for exclusiveMinimum
/exclusiveMaximum
. A boolean should no longer be accepted when using OAS v3.x.x.
Minimal reproducible OpenAPI snippet
openapi: 3.0.2
info:
title: title
version: 1.0.0
description: description
license:
name: A license
url: https://a.license.org
servers:
- url: https://a.server.org
paths:
/newPath:
get:
operationId: newPathGet
parameters:
- in: query
name: positiveValue
required: true
schema:
type: number
format: float
exclusiveMinimum: 0.0
summary: A test path.
responses:
204:
description: Successful
422:
description: Unprocessable
Screenshots
Additional context
Using OAS 3.0.2.
What happened?
Looks like extension always uses only recommended rules
What should have happened instead?
Rules defined in oas3_0Rules
should override recommended
rules
Minimal reproducible OpenAPI snippet
apiDefinitions:
main: ./openapi.yaml
lint:
rules:
info-description: warn
info-contact: off
info-license: off
info-license-url: off
tag-description: warn
tags-alphabetical: off
parameter-description: off
no-path-trailing-slash: warn
no-identical-paths: warn
no-ambiguous-paths: warn
path-declaration-must-exist: warn
path-not-include-query: warn
path-parameters-defined: warn
operation-description: off
operation-2xx-response: warn
operation-4xx-response: off
operation-operationId: warn
operation-summary: error
operation-operationId-unique: warn
operation-parameters-unique: warn
operation-tag-defined: off
operation-security-defined: warn
operation-operationId-url-safe: warn
operation-singular-tag: off
no-unresolved-refs: error
no-enum-type-mismatch: warn
boolean-parameter-prefixes: off
paths-kebab-case: off
no-invalid-schema-examples: off
no-invalid-parameter-examples: off
no-unused-components: warn
spec: error
oas3_0Rules:
no-invalid-media-type-examples: warn
extends: []
What should we improve?
We offer a default Redocly configuration file when we detect an openapi definition.
How should we improve it?
.redocly.yaml
to redocly.yaml
.# See https://redocly.com/docs/cli/configuration/configuration-file/ for information on how to customize your configuration
apis:
changeme@v1:
root: ./openapi.yaml
lint:
extends:
- recommended
rules:
paths-kebab-case: error
features.openapi:
generateCodeSamples:
languages:
- lang: curl
- lang: Node.js
- lang: Python
Why should we improve it?
The current one doesn't actually work and requires the user to make a lot of changes.
Describe alternatives you've considered
apis
section.Additional context
The current generated file:
apiDefinitions:
# a set of named keys and values of entrypoints to OpenAPI definitions.
# example
# petstore: ./openapi.yaml
lint:
# the lint options
referenceDocs:
# the API reference docs options, including theme options.
What happened?
A clear and concise description of your issue.
When using a reference for a text field (e. g. description), it doesn't get bundled in the Cursor Context.
What should have happened instead?
A clear and concise description of the behavior you expected to happen.
Field values should be loaded from reference file
Minimal reproducible OpenAPI snippet
If possible, include a short example of your OpenAPI definition that we can use to simulate the problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other information about the problem here, like: the extension version number; OpenAPI version you're using in your definition; your operating system.
What happened?
Validation error is shown (red lines) if servers field is missing in spec.
What should have happened instead?
servers field is not required based on openapi 3.03.
Minimal reproducible OpenAPI snippet
openapi: 3.0.3
info: {title: '', version: ''}
components: {}
paths:
/path:
summary: TODO
Additional context
Redocly OpenAPI v0.2.3
.redocly.yaml contents:
apiDefinitions:
root: hidden.yaml
lint:
extends:
- recommended
rules:
tag-description: off
operation-summary: error
no-unresolved-refs: error
no-unused-components: error
operation-2xx-response: error
operation-operationId: error
operation-singular-tag: error
no-enum-type-mismatch: error
no-identical-paths: error
no-ambiguous-paths: error
What happened?
A specification file with OpenAPI version set to 2.x or 3.0.x is marked as invalid.
What should have happened instead?
OpenAPI 2., 3.0 and 3.1 should be supported as described in the extension description. The validation rules should reflect the version specified in the file automatically.
Screenshots
Additional context
Extension version: Release 0.1.0 (2021-11-18)
VS Code version: Version: 1.63.0-insider
What happened?
This is best illustrated by a picture. I start to type $r
and then select $ref and end up with $$ref:
.
What should have happened instead?
It should say $ref:
(with a single dollar sign).
Minimal reproducible OpenAPI snippet
n/a
Screenshots
Posted above
Additional context
I hit this snag quite frequently, so I think it is a real inconvenience (at least for me).
What happened?
Every time I open an unrelated project not having a redocly config file (for example, a repo with c++ microcontroller code), extension asks if I want to initialize a config file.
What should have happened instead?
I would like to be able to disable this behavior in settings
What happened?
Formatting is changed after saving
A clear and concise description of your issue.
What should have happened instead?
A clear and concise description of the behavior you expected to happen.
Text formating should not have changed
Minimal reproducible OpenAPI snippet
If possible, include a short example of your OpenAPI definition that we can use to simulate the problem.
openapi: 3.1.0
tags:
- name: Example
description: |
Lorem Ipsum is simply dummy text of the
printing and typesetting industry.
Lorem Ipsum has been the industry's standard
dummy text ever since the 1500s,
when an unknown printer took a galley of type
and scrambled it to make a type specimen book.
Screenshots
If applicable, add screenshots to help explain your problem.
See above
Additional context
Add any other information about the problem here, like: the extension version number; OpenAPI version you're using in your definition; your operating system.
What happened?
With Cursor Context opened, select several nodes in a definition file. The description in Cursor Context starts glimmering.
What should have happened instead?
It should not glimmer.
Minimal reproducible OpenAPI snippet
Any definition file.
Screenshots
Additional context
Most likely this happens because we show the context of the cursor position (which also happens to be the end of selection). We may want to use debounce, or otherwise always show the context of the first selected node.
What happened?
All OpenAPI yaml files that have $ref
values pointing at a relative "external" OpenAPI yaml file have the WSL2 file://
path generated with an extraneous /
character after the "wsl", e.g.
file://wsl/%24/Ubuntu-20.04/home/steve/github/bbc/account-service-contract/openapi/base.yaml
This filepath is NOT valid in Windows Explorer, and nothing loads when pasting it into Windows Explorer address bar and pressing Enter.
What should have happened instead?
The WSL2 file locations should be generated without the /
character following "wsl", e.g.
file://wsl%24/Ubuntu-20.04/home/steve/github/bbc/account-service-contract/openapi/base.yaml
This file URL is valid in Windows Explorer, and pasting this into its address bar and pressing Enter produces an Open File With dialog window, including the option to open in VS Code, which successfully opens.
Minimal reproducible OpenAPI snippet
main-example.yaml
openapi: '3.0.0'
info:
title: '@project.name@'
version: '@project.version@'
description: main
servers:
- url: http://localhost:8080
description: Local development (Spring Boot)
paths:
/v3/user/association:
post:
tags:
- user
summary: Create user association
parameters:
- $ref: 'base-example.yaml#/components/parameters/headerXray'
description: The ref above currently generates a malformed WSL2 path in Redocly extension
operationId: association
responses:
'204':
description: Success. The account association was created.
base-example.yaml
openapi: '3.0.0'
info:
description: blah
version: '@project.version@'
title: '@project.name@'
servers:
- url: http://localhost:8080
description: Local development (Spring Boot)
paths:
/placeholder:
get:
summary: Placeholder
description: |
This is just a pretend API endpoint to satisfy the OpenAPI spec of having at least one
URI path. It is **NOT** a real API path.
responses:
'200':
description: OK
content:
text/plain:
schema:
type: string
example: dummy
components:
parameters:
headerXray:
name: x-amzn-trace-id
in: header
description: "**Automatically Generated** upstream (if AWS X-Ray is enabled)"
schema:
type: string
Screenshots
This results in errors for all WSL2 paths in $ref
values, e.g.
You can see that the Windows UNC path is resolved to \\wsl\$\Ubuntu-20.04\home\steve\github\bbc\account-service-contract\openapi\base-example.yaml
which is incorrect and should be \\wsl$\Ubuntu-20.04\home\steve\github\bbc\account-service-contract\openapi\base-example.yaml
.
Additional context
VS Code is the Windows application. My OpenAPI project is on a Ubuntu filesystem in a WSL2 installation.
Redocly OpenAPI extension 0.2.2
Released on
13/08/2021, 14:29:18
Last updated
25/01/2022, 10:20:33
Identifier
redocly.openapi-vs-code
PS C:\Users\steve> wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
docker-desktop-data
docker-desktop
Edition Windows 10 Pro
Version 21H1
Installed on 27/06/2021
OS build 19043.1526
Experience Windows Feature Experience Pack 120.2212.4170.0
What happened?
See the screenshot below.
What should have happened instead?
The YAML should change with the contact and license information.
openapi: 3.1.0
info:
description: Document the EU API quickly
title: EU Documents
version: '1.0'
contact:
name: Test
email: [email protected]
url: https://redocly.com
license:
name: Test
url: license.com
Minimal reproducible OpenAPI snippet
https://gist.github.com/adamaltman/66a0dacbc3ff769304db3d04456b5a47
Screenshots
Additional context
The key part is when there are no contact and license nodes to begin with...
What happened?
When you are in a live share session sometimes the plugin breaks from a an unknown point in time.
After that, when you click on a $ref link, vscode says the path does not exist.
If you have file x.yaml open the content of the error popup is: The path '/~1/x.yaml
does not exist on this computer.
We have a live share session open with two workspace directories. The OAS file is in the second workspace dir.
What should have happened instead?
vscode should scroll to that reference.
Minimal reproducible OpenAPI snippet
redoc-cli says there are no validation errors so not sure if this helps here.
Additional context
Both participants have Linux 5.5.x installed and the latest vscode version installed
What happened?
When resolving a $ref that points to an existing file the error appears:
What should have happened instead?
It should be able to bundle OpenAPI definition
Screenshots
Additional context
More details here
What happened?
Notice the types and subtypes in this VS Code preview:
Notice the same preview run with openapi preview-docs command (same exact API operation).
It is not displaying the enum values.
What should have happened instead?
It should display the enum values.
Minimal reproducible OpenAPI snippet
rebilly/api-definitions (core API "create kyc request")
Additional context
What happened?
When I open a file to lint, the Problems
are displayed in the terminal editor as expected. When the file is closed, the problems persist in the terminal window.
What should have happened instead?
The Problems
should be cleared for the closed file
A clear and concise description of the behavior you expected to happen.
I would really like to the see the Problems
cleared for the closed file AND any external reference files associated to the original file.
What happened?
Preview SOMETIMES doesn't render when opening large definitions.
What should have happened instead?
It should render a valid definition preview.
Minimal reproducible OpenAPI snippet
E. g. this one: https://github.com/Rebilly/api-definitions
Additional context
Extension version: v0.2.14
What happened?
The extension tries to read all yaml files in the workspace and not all of them are OpenAPI. Any yaml with custom tags seem to confuse the extension. Rather than reporting nicely, it ends up with a problem without a "source".
[{
"resource": "/path/to/example.yaml",
"owner": "_generated_diagnostic_collection_name_#0",
"severity": 8,
"message": "unknown tag !<!GetAtt> in \"/path/to/example.yaml\" (12:13)",
"startLineNumber": 12,
"startColumn": 13,
"endLineNumber": 12,
"endColumn": 13
}]
What should have happened instead?
Minimal reproducible OpenAPI snippet
CloudFormation from: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/gettingstarted.templatebasics.html
Resources:
myBucket:
Type: 'AWS::S3::Bucket'
myDistribution:
Type: 'AWS::CloudFront::Distribution'
Properties:
DistributionConfig:
Origins:
- DomainName: !GetAtt
- myBucket
- DomainName
Id: myS3Origin
S3OriginConfig: {}
Enabled: 'true'
DefaultCacheBehavior:
TargetOriginId: myS3Origin
ForwardedValues:
QueryString: 'false'
ViewerProtocolPolicy: allow-all
Additional context
This made it quite difficult to track down where the reported problem was coming from. It required disabling extensions until the problem disappeared to figure out it was Redocly.
What happened?
Version 0.2.0 has a reversion in that it says "Can't resolve $ref: files with [.md] extension aren't supported"
This causes a cascade of other issues, such as preview-docs not working for this API.
What should have happened instead?
It should resolve Markdown files referenced. (OpenAPI cli does it.)
Minimal reproducible OpenAPI snippet
https://github.com/redocly-demo/whatsfordinner-api
Screenshots
Showing the preview-docs is not functional:
Additional context
Being able to reference scalar values (most practical use case is Markdown descriptions) is practical and used extensively.
What should we improve?
At the moment, our extension isn't working in online editors.
However, Github Codespaces is essentially a an online VS Code emulator, so it should support using our extension.
How should we improve it?
process
and path
global varsfs
fs
)Describe alternatives you've considered
None
Additional context
See this article for more details on developing extensions for Github Codespaces.
What happened?
Suggest null
in schema->type for OpenApi 3.0
What should have happened instead?
Null should not displayed in openapi 3.0 definition
Minimal reproducible OpenAPI snippet
openapi: 3.0.0
servers:
- url: //petstore.swagger.io/v2
description: Default server
info:
description: Test
version: 1.0.0
title: Swagger Petstore
termsOfService: 'http://swagger.io/terms/'
contact:
name: API Support
email: [email protected]
url: https://github.com/Redocly/redoc
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: Add new pet to the store inventory.
operationId: addPet
responses:
'200':
description: wrong type suggestions
content:
application/json:
schema:
type: null <--here is problem
Screenshots
What happened?
Reviewing the docs indicates your API definition file is in the YAML format.
. JSON support was added in 0.2.0 according to the release notes.
What should have happened instead?
What should we improve?
please allow me to set the location of my config file in the VSC settings page. I don't always work in the same workspace where I store my config file and would like a global config to be available. Any workspace config should take precedence over the global config.
What should we improve?
Currently when navigating a long specification we have to rely on the YAML outline which is not quite convenient. Without semantics of openapi the outline is arbitrarily deep and hard to navigate. As a consequence, typing @ to search symbol brings too many results which are not useful. The following picture shows the condition:
How should we improve it?
It would be better to provide a seperate outline panel and help navigate paths and schemas. Also it would be useful if @ will bring paths and schemas only.
Why should we improve it?
OpenAPI docs are quite verbose and navigation is painful. This feature will greatly improve the experience.
Describe alternatives you've considered
Currently I manually collapse the YAML outline every time.
Additional context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.