Skip to content

feat(api): read the API docs that the meshStack itself serves - #59

Open
j0g3sc wants to merge 1 commit into
mainfrom
claude/api-docs-from-meshstack
Open

j0g3sc wants to merge 1 commit into
mainfrom
claude/api-docs-from-meshstack

Conversation

@j0g3sc

@j0g3sc j0g3sc commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

🤖 Written by AI agent

meshstack api and meshstack api-docs now read the API docs from /api/openapi of the meshStack they act against, instead of from docs.meshcloud.io. The docs then list the endpoints and versions that this meshStack offers, not those of the latest release.

  • api reads them from the endpoint it sends the request to.
  • api-docs takes the endpoint from --endpoint, MESHSTACK_ENDPOINT or the current stored profile. It reads no credential, so it still works without a login.
  • A meshStack older than /api/openapi answers 401 or 404 there. The CLI then reads the docs site, as before. Without any endpoint it reads the docs site too.
  • --dev and MESHSTACK_API_DOCS_URL still win over the endpoint.

Manually checked: meshstack api-docs --describe bb.list without any profile still reads the docs site.

🤖 Generated with Claude Code

meshstack api and meshstack api-docs now read the API docs from
/api/openapi of the meshStack they act against, so the docs list the
versions that meshStack offers rather than those of the latest release.
api-docs takes the endpoint from the flag, the environment or the current
stored profile, and reads no credential, so it still works without a login.

A meshStack older than /api/openapi answers 401 or 404 there; the CLI then
reads the docs of the docs site, as before. --dev and MESHSTACK_API_DOCS_URL
still win over the endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@meshcloud-gh-actions

Copy link
Copy Markdown

Coverage of the acceptance run against the meshStack backend, on 9bd3e93d038f43dd7d929216ff2dc9feddf7a67f.

Scope Coverage
Unit tests 78.0%
Acceptance tests 54.3%
Combined 80.5%
Uncovered functions
client/api_key.go:55: meshApiKeyClient.Create 0.0%
client/api_key.go:59: meshApiKeyClient.Read 0.0%
client/api_key.go:63: meshApiKeyClient.Update 0.0%
client/api_key.go:71: meshApiKeyClient.Delete 0.0%
client/api_key_permissions.go:20: ApiKeyPermissions.AllCodes 0.0%
client/api_key_permissions.go:33: ApiKeyPermissions.WorkspaceCodes 0.0%
client/api_key_permissions.go:295: AllApiKeyPermissions 0.0%
client/api_key_permissions.go:299: WorkspacePermissionCodes 0.0%
client/building_block_definition.go:71: MeshBuildingBlockDefinitionApprovalPolicies.NothingRequiresApproval 0.0%
client/building_block_definition.go:82: DisabledSchedule 0.0%
client/building_block_definition.go:89: MeshBuildingBlockDefinitionSchedule.IsDisabled 0.0%
client/building_block_definition.go:93: MeshBuildingBlockDefinitionSpec.HasNeutralPolicies 0.0%
client/building_block_definition.go:97: MeshBuildingBlockDefinitionSpec.WithNeutralPolicies 0.0%
client/building_block_definition.go:166: meshBuildingBlockDefinitionClient.List 0.0%
client/building_block_definition.go:173: meshBuildingBlockDefinitionClient.Read 0.0%
client/building_block_definition.go:177: meshBuildingBlockDefinitionClient.Create 0.0%
client/building_block_definition.go:181: meshBuildingBlockDefinitionClient.Update 0.0%
client/building_block_definition.go:185: meshBuildingBlockDefinitionClient.Delete 0.0%
client/building_block_definition_version.go:100: MeshBuildingBlockType.TagInputTargets 0.0%
client/building_block_definition_version.go:245: meshBuildingBlockDefinitionVersionClient.Create 0.0%
client/building_block_definition_version.go:254: meshBuildingBlockDefinitionVersionClient.Update 0.0%
client/building_block_definition_version_implementation.go:79: MeshBuildingBlockDefinitionImplementation.InferType 0.0%
client/building_block_definition_version_implementation.go:93: MeshBuildingBlockDefinitionImplementation.MarshalJSON 0.0%
client/building_block_definition_version_implementation.go:106: *MeshBuildingBlockDefinitionImplementation.UnmarshalJSON 0.0%
client/building_block_runner.go:87: meshBuildingBlockRunnerClient.Create 0.0%
... and 129 more

covdata func names a method without its receiver, so an entry can belong to an implementation nothing selects rather than to a function the tests never reached. Open the file and line before reading one as a coverage gap.

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.

1 participant