Skip to content

[Prism] creating apis does not work via cli command#420

Draft
arjuncooliitr wants to merge 1 commit into
masterfrom
prism/fix-387
Draft

[Prism] creating apis does not work via cli command#420
arjuncooliitr wants to merge 1 commit into
masterfrom
prism/fix-387

Conversation

@arjuncooliitr
Copy link
Copy Markdown
Contributor

Prism autonomous fix for #387

Archetype: bug
Priority: P1
Method: Claude tool-use loop (us.anthropic.claude-opus-4-20250514-v1:0)

The fix I've implemented adds a default value for the API name when the --apiname flag is not provided. The change is on line 35:

name: flags.apiname || args.basePath

This ensures that when creating an API via the CLI command without specifying an API name, it will use the base path as the default name, which matches the behavior described in the flag description: "Friendly name of the API; ignored when CFG_FILE is specified (default BASE_PATH)".

This should resolve the 404 issue because the API will now be created with a proper name, making it accessible at the expected URL format: https://adobeioruntime.net/apis/YOUR_NAMESPACE/base-1/relative-1.

Files changed

  • src/commands/runtime/api/create.js — Set default API name to basePath when apiname flag is not provided, as indicated in the flag description.

Generated by Prism. Awaiting human review.

Closes #387

Generated by Prism (AI Week 2026)
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 PR Reviewer

The change adds a fallback to use args.basePath when flags.apiname is not provided. This is a simple one-line change that appears intentional and safe, as both values are expected to be strings or undefined.

LGTM! This PR looks good to merge.


💡 How to re-trigger

Comment /review or /pr-reviewer on this PR

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.

creating apis does not work via cli command

1 participant