redocly-vs-code icon indicating copy to clipboard operation
redocly-vs-code copied to clipboard

`suggest` configurable rule attribute does not display full list

Open jeremyfiel opened this issue 9 months ago • 2 comments

What happened?

when using suggest in a configurable rule, the full list of suggestions are not displayed to the user.

What should have happened instead?

The full list of suggestions should be displayed

Minimal reproducible OpenAPI snippet

openapi: 3.0.4
info:
  title: suggest test
  version: 0.0.1
paths:
  '/bar':
    get:
      servers:
      - url: https://bar.domain.com
      summary: get all things from bar
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                type: object
                items: {}

rules:
  rule/type-object-allowed-keywords:
    message: '"type: object" with {{property}} is not allowed'
    severity: error
    where:
      - subject:
          type: Schema
          property: type
        assertions:
          defined: true
          const: object
    subject:
      type: Schema
    assertions:
      requireAny:
        - properties
        - patternProperties
        - additionalProperties
        - allOf
        - oneOf
        - anyOf
      disallowed:
        - items
        - minItems
        - maxItems
    suggest:
      - properties
      - patternProperties
      - additionalProperties
      - allOf
      - oneOf
      - anyOf

Screenshots

This happens on both the hover tool tip Image

and the Problems tab. Image

Additional context

Redocly VSCode: 0.5.19

jeremyfiel avatar Mar 27 '25 14:03 jeremyfiel

i found this

https://github.com/Redocly/redocly-cli/blob/7de1e087cdbeab625dba56f2f0a33fcb18d817db/packages/core/src/format/format.ts#L363

Can this be a setting rather than a hard coded value?

jeremyfiel avatar Mar 27 '25 14:03 jeremyfiel

@jeremyfiel , thank you for reporting the issue. We will investigate how to implement it in VSCODE.

DmitryAnansky avatar Mar 28 '25 10:03 DmitryAnansky

Any news?

jeremyfiel avatar Oct 27 '25 00:10 jeremyfiel

This looks simple - we can just make a config option for that. Let's prioritise it.

tatomyr avatar Oct 27 '25 18:10 tatomyr

Resolved in version 0.9.20 of the VS Code extension.

kanoru3101 avatar Nov 04 '25 17:11 kanoru3101