-
Notifications
You must be signed in to change notification settings - Fork 43
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
perf(openapi): upload improvements #518
perf(openapi): upload improvements #518
Conversation
- also i realphabetized the imports
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.
Found 11 potential problems in the proposed changes. Check the Files changed tab for more details.
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.
Found 11 potential problems in the proposed changes. Check the Files changed tab for more details.
@@ -98,17 +104,21 @@ | |||
it('should discover and upload an API definition if none is provided', async () => { | |||
promptHandler.createOasPrompt.mockResolvedValue({ option: 'create' }); | |||
|
|||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
@@ -139,8 +149,12 @@ | |||
['OpenAPI 3.1', 'json', '3.1', 'OpenAPI'], | |||
['OpenAPI 3.1', 'yaml', '3.1', 'OpenAPI'], | |||
])('should support updating a %s definition (format: %s)', async (_, format, specVersion, type) => { | |||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
@@ -159,8 +173,12 @@ | |||
}); | |||
|
|||
it('should return warning if providing `id` and `version`', async () => { | |||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
@@ -217,17 +235,21 @@ | |||
newVersion: '1.0.1', | |||
}); | |||
|
|||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
@@ -241,19 +263,22 @@ | |||
|
|||
it('should bundle and upload the expected content', async () => { | |||
let requestBody = null; | |||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
@@ -270,19 +295,22 @@ | |||
|
|||
it('should use specified working directory and upload the expected content', async () => { | |||
let requestBody = null; | |||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
@@ -367,14 +395,18 @@ | |||
help: 'If you need help, email [email protected] and mention log "fake-metrics-uuid".', | |||
}; | |||
|
|||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
@@ -399,14 +457,18 @@ | |||
help: 'If you need help, email [email protected] and mention log "fake-metrics-uuid".', | |||
}; | |||
|
|||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
@@ -419,14 +481,18 @@ | |||
}); | |||
|
|||
it('should error if API errors (generic upload error)', async () => { | |||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
@@ -439,14 +505,18 @@ | |||
}); | |||
|
|||
it('should error if API errors (request timeout)', async () => { | |||
const registryUUID = getRandomRegistryId(); |
Check notice
Code scanning
Insecure randomness
codeql blowing up the PR with comments now (that i'm unable to delete)... (shakes fist) |
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.
everything here looks pretty solid!
(hopefully) fixes #499
🧰 Changes
openapi
command to support new two-part spec upload process 🚀ora
into the mix so users can have better visibility into the validation/upload process 🧭Previous TODOs (archived)
openapi
command to support new process ✨ora
loading spinners 🧭🧬 QA & Testing
Do tests pass? You can also test this command with a project of your own by checking out this branch and running:
Footnotes
I did a lot of test coverage/cleanup work as part of these changes, but that blew up the diff and scope of this PR so any changes unrelated to this new
openapi
process can be found in #520. ↩