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: STOP-243 - create prism instance with full spec #2501

Merged
merged 8 commits into from
Mar 22, 2024

Conversation

brendarearden
Copy link
Contributor

@brendarearden brendarearden commented Mar 20, 2024

Addresses: STOP-243
Summary

Introduces createAndCallPrismInstanceWithSpec that allows you to pass in a prism config, prism request and an oas spec path or document and get a prism response or an error string back.

Checklist

  • The basics
    • I tested these changes manually in my local or dev environment
  • Tests
    • Added or updated
    • N/A
  • Event Tracking
    • I added event tracking and followed the event tracking guidelines
    • N/A
  • Error Reporting
    • I reported errors and followed the error reporting guidelines
    • N/A

@brendarearden brendarearden requested a review from a team as a code owner March 20, 2024 19:09
@brendarearden brendarearden requested review from mallachari and removed request for a team March 20, 2024 19:09
@@ -640,7 +640,7 @@ describe('body params validation', () => {
});

describe('and size bigger than 10MB', () => {
test('returns 422', async () => {
test('returns 413', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was checking a 413, so I updated the title to match.

the rest of the changes in this file are formatting changes

@brendarearden brendarearden changed the title Feat/stop 243 prism mocking accepts full spec feat: STOP-243 - prism mocking accepts full spec Mar 20, 2024
@brendarearden brendarearden requested a review from a team March 20, 2024 20:34
packages/http/src/instanceWithSpec.ts Show resolved Hide resolved
packages/http/src/instanceWithSpec.ts Outdated Show resolved Hide resolved
packages/http/src/instanceWithSpec.ts Outdated Show resolved Hide resolved
packages/http/src/instanceWithSpec.ts Outdated Show resolved Hide resolved
},
};
const result = decycle(
await new $RefParser().dereference(specFilePathOrObject, { resolve: { http: httpResolverOpts } })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@daniel-white we are going to leave this here and then add a check for unresolved external references in our usage of this code and error at that point.

@brendarearden brendarearden force-pushed the feat/STOP-243-mock-accept-full-spec branch from 58f75fe to 81bfbe8 Compare March 21, 2024 22:16
@brendarearden brendarearden force-pushed the feat/STOP-243-mock-accept-full-spec branch from 81bfbe8 to 794b321 Compare March 21, 2024 22:17
@brendarearden brendarearden changed the title feat: STOP-243 - prism mocking accepts full spec feat: STOP-243 - create prism instance with full spec Mar 22, 2024
@brendarearden brendarearden merged commit ed41dca into master Mar 22, 2024
8 checks passed
@brendarearden brendarearden deleted the feat/STOP-243-mock-accept-full-spec branch March 22, 2024 15:06
This was referenced Apr 29, 2024
This was referenced Jul 2, 2024
This was referenced Aug 8, 2024
ilanashapiro pushed a commit to ilanashapiro/prism that referenced this pull request Aug 22, 2024
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.

3 participants