Skip to content

Stoplight masks not able to render in the UI from the Docs page #2791

@albertopneto

Description

@albertopneto

When creating mask that refs another mask, the preview of the edit page works well, however the Docs page is not able to render the nested mask json. Also, the export function doesn't export masks that are not referenced directly in the yaml file.

Preview of Edit page works well, see img below:

Image

Current Behavior

I have a mask called BankDetailsMask that refs another Mask called BankAccountMask, see the error I get from the Docs page:

From the Docs page I see below error:
Image

See the Docs page trying to render the Mask that is a ref of a ref

Image

Note: All other masks that don't have a ref to another masks are loaded with no issues...

Expected Behavior

Able to render the UI with Masks and sub masks.

Possible Workaround/Solution

Not able to find anything else to help me , unless I drop the idea of using masks which is really bad.... masks are amazing

Steps to Reproduce

  1. Create a model for BankAccount
  2. Create a mask for BankAccount called BankAccountMask
  3. Create a model called BankDetails
  4. Add a property called bankAccount in the BankDetails model and ref the BankAccountMask
  5. Create a mask for BankDetails called BankDetailsMask
  6. Create a model called Person
  7. Add a property in the Person model called bankDetails and point to the BankDetailsMask
  8. From any post endpoint in the API, ref the BankDetailsMask which under the hood ref to BankAccountMaskOnce you have the above, you will see that the Docs page is not able to load the examples and also not able to load the model in the UI

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