fix: expose --name and --region-id flags on project create#476
Open
margaretjgu wants to merge 3 commits into
Open
fix: expose --name and --region-id flags on project create#476margaretjgu wants to merge 3 commits into
margaretjgu wants to merge 3 commits into
Conversation
Contributor
✅MegaLinter analysis: Success
Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts MegaLinter is graciously provided by OX Security |
JoshMock
approved these changes
Jul 15, 2026
JoshMock
left a comment
Member
There was a problem hiding this comment.
LGTM. was the code generator updated to reflect the changes to the three APIs?
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
Closes #328.
cloud serverless projects {search,observability,security} createonly showed generic flags (--input-file,--wait, etc.). The required body fieldsnameandregion_idhad no flag equivalents, forcing users to write a JSON file just to set two scalars.Root cause: the codegen API definitions for the three create commands had no
bodyschema, sobuildCommandSchemaproduced an emptyz.looseObject({})with no derived flags.Fix: add a
body: z.object({ name, region_id })to each create definition. The existingbuildCommandSchema->extractSchemaArgs->defineCommandpipeline handles the rest automatically, registering--nameand--region-idflags and routing them into the POST body.Before:
After:
Applies to all three project types: search, observability, security.
Test plan
elastic cloud serverless projects search create --helpshows--nameand--region-idelastic cloud serverless projects observability create --helpshows--nameand--region-idelastic cloud serverless projects security create --helpshows--nameand--region-id--input-filestill works (flags merge on top of JSON input)