Skip to content

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

Merged
j0g3sc merged 1 commit into
mainfrom
claude/api-docs-from-meshstack
Nov 9, 2026
Merged

j0g3sc merged 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

@meshcloud-gh-actions

meshcloud-gh-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Coverage of the acceptance run against the meshStack backend, on 73a65f6b987bf91ca8d94778e2571640a3174eec.

Scope Coverage
Unit tests 78.4%
Acceptance tests 54.9%
Combined 80.9%
Uncovered functions
client/api_key.go:52: meshApiKeyClient.Create 0.0%
client/api_key.go:56: meshApiKeyClient.Read 0.0%
client/api_key.go:60: meshApiKeyClient.Update 0.0%
client/api_key.go:64: 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:262: AllApiKeyPermissions 0.0%
client/api_key_permissions.go:266: 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:101: 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:81: MeshBuildingBlockDefinitionImplementation.InferType 0.0%
client/building_block_definition_version_implementation.go:95: MeshBuildingBlockDefinitionImplementation.MarshalJSONTo 0.0%
client/building_block_definition_version_implementation.go:108: *MeshBuildingBlockDefinitionImplementation.UnmarshalJSONFrom 0.0%
client/building_block_runner.go:93: meshBuildingBlockRunnerClient.Create 0.0%
... and 127 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.

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>
@j0g3sc
j0g3sc force-pushed the claude/api-docs-from-meshstack branch from 9bd3e93 to 73a65f6 Compare November 9, 2026 07:53
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@j0g3sc
j0g3sc requested a review from grubmeshi November 9, 2026 08:34
@j0g3sc
j0g3sc merged commit a4f3362 into main Nov 9, 2026
14 checks passed
@j0g3sc
j0g3sc deleted the claude/api-docs-from-meshstack branch November 9, 2026 08:43
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