Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PramField: document types #249

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

PramField: document types #249

wants to merge 1 commit into from

Conversation

aviau
Copy link

@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
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
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
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.

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.

2 participants