Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions docs/thv-registry-api/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

113 changes: 113 additions & 0 deletions docs/thv-registry-api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,15 @@
},
"type": "object"
},
"internal_api_v1.entryClaimsResponse": {
"properties": {
"claims": {
"additionalProperties": {},
"type": "object"
}
},
"type": "object"
},
"internal_api_v1.meResponse": {
"properties": {
"roles": {
Expand Down Expand Up @@ -1984,6 +1993,110 @@
}
},
"/v1/entries/{type}/{name}/claims": {
"get": {
"description": "Get the claims for an API-published entry name within the managed source.\nClaims are stored at the entry-name level and are shared by every version of that name.\nSynced-source entries (git/api/file/kubernetes) are out of scope: their claims come from\nupstream (the source manifest or the `toolhive.stacklok.dev/authz-claims` annotation) and\nare surfaced through the `/v1/sources/{name}/entries` and `/v1/registries/{name}/entries` lists.",
"parameters": [
{
"description": "Entry Type (server or skill)",
"in": "path",
"name": "type",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Entry Name",
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internal_api_v1.entryClaimsResponse"
}
}
},
"description": "Entry claims"
},
"400": {
"content": {
"application/json": {
"schema": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
}
},
"description": "Bad request"
},
"403": {
"content": {
"application/json": {
"schema": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
}
},
"description": "Forbidden"
},
"404": {
"content": {
"application/json": {
"schema": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
}
},
"description": "Not found"
},
"500": {
"content": {
"application/json": {
"schema": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
}
},
"description": "Internal server error"
},
"503": {
"content": {
"application/json": {
"schema": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
}
},
"description": "No managed source available"
}
},
"summary": "Get entry claims",
"tags": [
"v1"
]
},
"put": {
"description": "Update claims for a published entry name",
"parameters": [
Expand Down
76 changes: 76 additions & 0 deletions docs/thv-registry-api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ components:
description: Number of skills in registry
type: integer
type: object
internal_api_v1.entryClaimsResponse:
properties:
claims:
additionalProperties: {}
type: object
type: object
internal_api_v1.meResponse:
properties:
roles:
Expand Down Expand Up @@ -1356,6 +1362,76 @@ paths:
tags:
- v1
/v1/entries/{type}/{name}/claims:
get:
description: |-
Get the claims for an API-published entry name within the managed source.
Claims are stored at the entry-name level and are shared by every version of that name.
Synced-source entries (git/api/file/kubernetes) are out of scope: their claims come from
upstream (the source manifest or the `toolhive.stacklok.dev/authz-claims` annotation) and
are surfaced through the `/v1/sources/{name}/entries` and `/v1/registries/{name}/entries` lists.
parameters:
- description: Entry Type (server or skill)
in: path
name: type
required: true
schema:
type: string
- description: Entry Name
in: path
name: name
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/internal_api_v1.entryClaimsResponse'
description: Entry claims
"400":
content:
application/json:
schema:
additionalProperties:
type: string
type: object
description: Bad request
"403":
content:
application/json:
schema:
additionalProperties:
type: string
type: object
description: Forbidden
"404":
content:
application/json:
schema:
additionalProperties:
type: string
type: object
description: Not found
"500":
content:
application/json:
schema:
additionalProperties:
type: string
type: object
description: Internal server error
"503":
content:
application/json:
schema:
additionalProperties:
type: string
type: object
description: No managed source available
summary: Get entry claims
tags:
- v1
put:
description: Update claims for a published entry name
parameters:
Expand Down
Loading
Loading