chore: refresh OpenAPI spec + accept optional managedBy#21
Merged
Conversation
mono#369 made managedBy optional on CreateMonitorRequest (server defaults to "API" / surface-injected value), added managedBy to RG/StatusPage/ AlertChannel responses, and added MonitorDto.currentStatus. - regen src/generated/api.ts from fresh spec - flip "rejects missing managedBy" -> "accepts missing managedBy" to match the new contract (sdk-python#26 made the same change) Fixes the spec-check failure that fired on the spec_updated dispatch after mono#369 was merged. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirrors
sdk-python#26. Aftermono#369merged,spec_updatedwas dispatched and the JS SDK'sspec-checkran red because:managedByonResourceGroupDto/StatusPageDto/AlertChannelDto, missingcurrentStatusonMonitorDto).CreateMonitorRequest.managedByflipped from required → optional, sotest/negative-validation.test.ts > rejects missing managedBystarted failing (the server now defaults toAPIor to the surface-injected value).This PR:
docs/openapi/monitoring-api.jsonfrom the production spec.src/generated/api.ts.accepts missing managedBy (server defaults to API).Why managedBy is now optional
Forcing every caller to set
managedBywas friction we couldn't justify — the API can derive it from the auth context (APIfor raw API tokens,CLI/TERRAFORM/MCPwhen surface clients inject it). Default behaviour is unchanged for callers who do set it.Test plan
npm test→ 1321/1321 passnpm run lintcleannpm run typecheckcleanMade with Cursor