Skip to content

Invalid JSON pointer exception as soon as I add produces: application/json #1624

Closed

Description

@hilsonp

Using the vs-redoc-viewer extension in VSCode, I was not seeing my reply samples for my swagger 2.0 definition.
I found this bug #1205

The problem is that as soon as I add:

produces:
  - application/json

I get the exception:

Something went wrong...
Invalid JSON pointer: ./CommonV1.yaml#/definitions/SelfLink
Stack trace
Error: Invalid JSON pointer: ./CommonV1.yaml#/definitions/SelfLink
    at o.parse (https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:22:94936)
    at Function.e.parse (https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:100:31301)
    at Function.o.get (https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:22:93496)
    at Jt (https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:100:55709)
    at Yt (https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:100:54098)
    at Jt (https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:100:55951)
    at an (https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:100:58528)
    at e.generateExample (https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:100:60615)
    at new e (https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:100:60032)
    at https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js:100:61043

ReDoc Version: 2.0.0-rc.53
Commit: 5c8524d

Using swagger-ui-watcher, the responses samples (using ./CommonV1.yaml#/definitions/SelfLink) are rendered without the "produces" property hence I think my yaml file is correct.

Redoc provides a clearer view and supports the 'discriminator' in swagger 2.0 which swagger-ui does not.

Could you help me ?

Thank you.

Activity

  1. RomanHotsiy commented on Jun 1, 2021

    @RomanHotsiy
    Member

    Could you please share a minimal reproducible sample?

  2. hilsonp commented on Jun 4, 2021

    @hilsonp
    Author

    I will as soon as possible.

  3. RomanHotsiy commented on Jul 30, 2021

    @RomanHotsiy
    Member

    Closing, for now, feel free to reopen.

  4. vanstoker commented on Jan 19, 2022

    @vanstoker

    Hi!
    I have the same problem. Can somebody had solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions