Skip to content

Conversation

@aviau
Copy link
Contributor

@aviau aviau commented Aug 12, 2024

These are the types that I could guess. There is probably more. It took me a while to figure out the array syntax.

@aviau
Copy link
Contributor Author

aviau commented Aug 12, 2024

Preview:

Screenshot 2024-08-12 at 1 35 18 PM

@mohab-sameh
Copy link
Contributor

@aviau The type prop is used to pass any string, not specific data types. The type prop supports and accepts string only. Within that string, you can write any data type or even any piece of text you want to type (even if it doesn't make sense to do so). There is no constraint enforced by Mintlify here.

@aviau
Copy link
Contributor Author

aviau commented Aug 16, 2024

There is no constraint enforced by Mintlify here.

@mohab-sameh that is not really true if you consider the playground.

I had to try many things until I figured out that string[] worked for the playground.

@mohab-sameh
Copy link
Contributor

@aviau ah yes, I didn't consider that! Hmm maybe this needs some brainstorming by the Mintlify team. Simply putting a constraint over the type prop will cause issues in non-playground cases where you might have several allowed data types like string | object | etc... Maybe for now having a callout that explains these constraints that only apply in playground configuration can be a middle ground.

@aviau
Copy link
Contributor Author

aviau commented Aug 16, 2024

Yeah I don't suggest putting a constraint, I only suggest documenting which types work with the playground. Feel free to edit my PR to whatever you think is acceptable, as long as it ends up documentng the suppoted playground types.

@hahnbeelee hahnbeelee merged commit ce5b15a into mintlify:main Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants