Creating a dynamic openapi schema

Hey Everyone,

I'm creating a module and am looking to create a dynamic openapi schema based on a type. Something like this screenshot

Depending on the type, the schema changes. Any guidance or examples for this kind of behavior I can implement in my module would be greatly appreciated. Thanks!