-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable openapi spec swagger link in api register #73
Conversation
refactor: add apic api update example
refactor: remove duplicate example for apic create
feat: add examples for create & update apic service with system assigned identity
fix: fix external doc extracting bug in spec
…n-api-register refactor: remove summary setting in api register
# Raise an error for bad status codes | ||
response.raise_for_status() | ||
# Parse the content | ||
data = json.loads(response.content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it may also be a yaml file
data = json.loads(response.content) | ||
value = json.dumps(data) if data else None | ||
except requests.exceptions.RequestException as e: | ||
print(f"Error fetching data from {api_location}: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use logger to log the message
print(f"Error fetching data from {api_location}: {e}") | ||
value = None | ||
else: | ||
# TODO Future Confirm its a file and not link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May remove this TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When import definition in api registre
command (line 325-334), it's better to import from user provided link instead of passing the downloaded file content to avoid spec size too large error.
Do you mean that if spec api location is a user-provided url link, it is better to set value=this link? |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally? (pip install wheel==0.30.0
required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.json
automatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json
.