redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Schemas based on ref get incorrectly replace at bundle time

Open jeluard opened this issue 1 year ago • 4 comments

Describe the bug

A schema referencing another schema via ref will get incorrectly replaced when bundling.

e.g.

Uint64:
  type: string
  example: "1"

GenesisTime:
  $ref: "./primitive.yaml#/Uint64"
  example: "1590832934"
  description: "The genesis_time configured for the beacon node, which is the unix time in seconds at which the Eth2.0 chain began."

...
properties:
  genesis_time:
    $ref: '../../beacon-node-oapi.yaml#/components/schemas/GenesisTime'

will generate

genesis_time:
  type: string
  example: '1'

Expected behavior

I would expect the following to be generated. swagger-cli does.

genesis_time:
  type: string
  example: '1590832934'
  genesis: 'The genesis_time configured for the beacon node, which is the unix time in seconds at which the Eth2.0 chain began.'

jeluard avatar Jan 18 '24 13:01 jeluard

Hello @jeluard,

Could you please provide us with a full API definition on which we will be able to reproduce this behavior?

Thank you.

ZyzychO avatar Jan 22 '24 17:01 ZyzychO

@ZyzychO Sure! The full one is here

jeluard avatar Jan 23 '24 12:01 jeluard

@ZyzychO can I help somehow?

jeluard avatar Feb 16 '24 09:02 jeluard

Hello @jeluard,

Could you please provide us with a full API definition on which we will be able to reproduce this behavior?

Thank you.

This is a blocker for us to use redocly

sambacha avatar Apr 02 '24 21:04 sambacha