Skip to content

feat(AIENG:420): Add command to download OpenAPI schema for Smart Tes…#1303

Merged
psakthivel04 merged 3 commits into
mainfrom
feat/AIENG-420-schema
May 26, 2026
Merged

feat(AIENG:420): Add command to download OpenAPI schema for Smart Tes…#1303
psakthivel04 merged 3 commits into
mainfrom
feat/AIENG-420-schema

Conversation

@psakthivel04
Copy link
Copy Markdown
Contributor

@psakthivel04 psakthivel04 commented May 22, 2026

This pull request adds a new CLI command to download the OpenAPI schema for the Smart Tests API. The main focus is the introduction of the api_schema command, which enables users to fetch and save the API schema as a JSON file. Additionally, the command is registered in the CLI structure.

New API Schema Download Feature:

  • Added a new api_schema command in smart_tests/commands/get/api_schema.py that allows users to download the OpenAPI schema from the /intake/v3/api-docs endpoint and save it to a specified file. The command handles error cases gracefully and provides user feedback.
  • Registered the new api_schema command in the get command group by importing and adding it in smart_tests/commands/get/__init__.py. [1] [2]…ts API

Manual testing:

image

is it downloaded?- yes
image

can we able to import in swagger editor? yes

image

@psakthivel04 psakthivel04 requested a review from Konboi May 22, 2026 09:41
Comment thread smart_tests/commands/get/api_schema.py Outdated

try:
# Fetch schema from /intake/v3/api-docs endpoint
res = http_client.request("get", "/intake/v3/api-docs")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well, the users cannot directly call this endpoint and this is a command intended to be passed to things like the Coding Agent on the user side.

Therefore, similar to the docs command, please do the following:

  1. Save schema.json under the smart_tests directory, or create a schema directory and save the schema file there.
  2. Include it in the release.
  3. Make it possible to copy the command output after execution.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes update it

@psakthivel04 psakthivel04 force-pushed the feat/AIENG-420-schema branch from 8386597 to 7546375 Compare May 25, 2026 06:54
@psakthivel04 psakthivel04 force-pushed the feat/AIENG-420-schema branch from 37d58b5 to 2ae8825 Compare May 25, 2026 09:16
@psakthivel04 psakthivel04 requested a review from Konboi May 25, 2026 09:31
Copy link
Copy Markdown
Contributor

@Konboi Konboi left a comment

Choose a reason for hiding this comment

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

LGTM

@psakthivel04 psakthivel04 merged commit 9a495ce into main May 26, 2026
3 checks passed
@psakthivel04 psakthivel04 deleted the feat/AIENG-420-schema branch May 26, 2026 09:06
@github-actions github-actions Bot mentioned this pull request May 26, 2026
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.

2 participants