New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openapi-msw

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-msw - npm Package Versions

1

0.2.1

Diff

Changelog

Source

0.2.1

Patch Changes

christoph-fricke
published 0.2.0 •

Changelog

Source

0.2.0

Minor Changes

Patch Changes

christoph-fricke
published 0.1.2 •

Changelog

Source

0.1.2

Patch Changes

  • #17 2931f0c Thanks @christoph-fricke! - Fixed OpenAPI operations with no-content responses cannot return a response. Now they are required to return an empty response, i.e. null as response body.

    const http = createOpenApiHttp<paths>();
    
    // Resolver function is required to return a `StrictResponse<null>` (empty response)
    // if the OpenAPI operation specifies `content?: never` for the response.
    const noContent = http.delete("/resource", ({ params }) => {
      return HttpResponse.json(null, { status: 204 });
    });
    
christoph-fricke
published 0.1.1 •

Changelog

Source

0.1.1

Patch Changes

  • #12 96ce15c Thanks @christoph-fricke! - Add legacy entrypoint definitions (types, module) for tools and bundlers that do not understand package.json#exports fields.
christoph-fricke
published 0.1.0 •

Changelog

Source

0.1.0

Minor Changes

  • #9 6364870 Thanks @christoph-fricke! - Added installation and complete usage guide to the documentation.

  • #5 d15a0c2 Thanks @christoph-fricke! - Added createOpenApiHttp(...) to create a thin, type-safe wrapper around MSW's http that uses openapi-ts paths:

    import type { paths } from "./openapi-ts-definitions";
    
    const http = createOpenApiHttp<paths>();
    
    // Define handlers with fully typed paths, path params, and request/response bodies
    const handler = http.get("/pets/{id}", () => {
      /* ... */
    });
    
    // Fallback to default http implementation
    const catchAll = http.untyped.all("*", () => {
      /* ... */
    });
    
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc