grafana / grafana/k6-cloud-openapi-client-go

X-Stack-Id header parameter is still int32 while other resource IDs were widened to int64

Open
#33 0 comments 0 reactions 1 assignee Claimed by @fornfrey View on GitHub
Dominant language
Mustache
Stars
6
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## What's wrong

Every generated request builder still exposes `X-Stack-Id` as int32,
e.g.:

func (r *ApiProjectsListRequest) XStackId(xStackId int32) *ApiProjectsListRequest

This wasn't widened in the recent regenerations (#29, #30) that moved
project ID, load test ID, test run ID, and default_project_id from
int32 to int64. Stack IDs are now the only ID-shaped value left at
32 bits, despite scoping the resources whose IDs were widened.

## Root cause

`X-Stack-Id` is a single shared parameter component in `schema.yaml`,
referenced via `$ref` from ~50 operations:

components:
parameters:
stackId:
in: header
name: X-Stack-Id
schema:
type: integer
required: true

No `format` key, so openapi-generator defaults it to int32. The two
regeneration commits that did the actual widening added `format: int64`
to dozens of other id/project_id fields but never touched this block
(it only moved position in the diff, content unchanged) - looks like
an oversight, not a deliberate choice.

## Suggested fix

Add `format: int64` to `components.parameters.stackId.schema` and
regenerate. Since it's a shared `$ref`'d component, this one-line
edit should propagate an int64 `XStackId` setter to every operation
automatically - no template changes needed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.