Skip to content
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

Closed
wants to merge 66 commits into from

Conversation

frankqianms
Copy link
Collaborator

@frankqianms frankqianms commented Oct 10, 2024


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.

frankqianms and others added 30 commits September 18, 2024 15:37
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)
Copy link
Owner

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}")
Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

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

May remove this TODO?

Copy link
Owner

@blackchoey blackchoey left a 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.

@frankqianms
Copy link
Collaborator Author

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?

@frankqianms frankqianms deleted the frank/enable_OpenAPI_link branch October 11, 2024 07:29
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