Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ts-rest/open-api

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-rest/open-api - npm Package Compare versions

Comparing version 3.40.1 to 3.41.0

6

CHANGELOG.md
# @ts-rest/open-api
## 3.41.0
### Patch Changes
- a0ee91d: Fix setting of response description
## 3.40.1

@@ -4,0 +10,0 @@

12

index.cjs.js

@@ -153,9 +153,11 @@ 'use strict';

: null;
const responses = Object.keys(path.route.responses).reduce((acc, key) => {
const keyAsNumber = Number(key);
const responseSchema = getOpenApiSchemaFromZod(path.route.responses[keyAsNumber], true);
const responses = Object.entries(path.route.responses).reduce((acc, [statusCode, response]) => {
const responseSchema = getOpenApiSchemaFromZod(response, true);
const description = core.isZodType(response) && response.description
? response.description
: statusCode;
return {
...acc,
[keyAsNumber]: {
description: `${keyAsNumber}`,
[statusCode]: {
description,
...(responseSchema

@@ -162,0 +164,0 @@ ? {

@@ -1,2 +0,2 @@

import { isAppRoute, isZodType, isZodObject, extractZodObjectShape } from '@ts-rest/core';
import { isZodType, isAppRoute, isZodObject, extractZodObjectShape } from '@ts-rest/core';
import { generateSchema } from '@anatine/zod-openapi';

@@ -149,9 +149,11 @@

: null;
const responses = Object.keys(path.route.responses).reduce((acc, key) => {
const keyAsNumber = Number(key);
const responseSchema = getOpenApiSchemaFromZod(path.route.responses[keyAsNumber], true);
const responses = Object.entries(path.route.responses).reduce((acc, [statusCode, response]) => {
const responseSchema = getOpenApiSchemaFromZod(response, true);
const description = isZodType(response) && response.description
? response.description
: statusCode;
return {
...acc,
[keyAsNumber]: {
description: `${keyAsNumber}`,
[statusCode]: {
description,
...(responseSchema

@@ -158,0 +160,0 @@ ? {

{
"name": "@ts-rest/open-api",
"version": "3.40.1",
"version": "3.41.0",
"dependencies": {

@@ -5,0 +5,0 @@ "@anatine/zod-openapi": "^1.12.0",

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