feat: add optional hidden property to endpoint items and filter hidden endpoints in endpoint card (#19163)
This commit is contained in:
parent
0358859467
commit
623ac7ea6d
2 changed files with 2 additions and 1 deletions
|
|
@ -149,7 +149,7 @@ const EndpointCard = ({
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{data.declaration.endpoints.map((endpoint, index) => (
|
{data.declaration.endpoints.filter(endpoint => !endpoint.hidden).map((endpoint, index) => (
|
||||||
<div key={index} className='flex h-6 items-center'>
|
<div key={index} className='flex h-6 items-center'>
|
||||||
<div className='system-xs-regular w-12 shrink-0 text-text-tertiary'>{endpoint.method}</div>
|
<div className='system-xs-regular w-12 shrink-0 text-text-tertiary'>{endpoint.method}</div>
|
||||||
<div className='group/item system-xs-regular flex grow items-center truncate text-text-secondary'>
|
<div className='group/item system-xs-regular flex grow items-center truncate text-text-secondary'>
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ export type PluginEndpointDeclaration = {
|
||||||
export type EndpointItem = {
|
export type EndpointItem = {
|
||||||
path: string
|
path: string
|
||||||
method: string
|
method: string
|
||||||
|
hidden?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EndpointListItem = {
|
export type EndpointListItem = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue