Home / Function/ ApiBodyParam() — supabase Function Reference

ApiBodyParam() — supabase Function Reference

Architecture documentation for the ApiBodyParam() function in ApiBodyParam.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/docs/components/ApiBodyParam.tsx lines 8–44

const ApiBodyParam = ({ name, value, isOptional }: IParamProps) => {
  return (
    <Param
      key={name}
      name={name}
      type={
        (value as any).type === 'array'
          ? `array[${(value as any).items?.type}]`
          : (value as any).type
      }
      description={value.description}
      isOptional={isOptional}
    >
      {(value as any).enum && (
        <Options>
          {(value as any).enum.map((value) => {
            return <Options.Option key={value} name={value} isEnum={true} />
          })}
        </Options>
      )}
      {(value as any).type === 'object' && (
        <ApiSchemaOptions>
          <div
            className="
              px-5 py-3 first:border-t border-b border-l border-r
              border-default
              last:rounded-bl-lg last:rounded-br-lg
              flex flex-col gap-3
            "
          >
            <ApiSchema id={name} schema={value}></ApiSchema>
          </div>
        </ApiSchemaOptions>
      )}
    </Param>
  )
}

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free