@efebia/fastify-zod-reply 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ const findStatusCode = (statusCode, availableStatusCodes) => {
20
20
  });
21
21
  };
22
22
  const routeV4 = (schema, handler) => {
23
- const finalResult = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (schema.Body && { body: v4_1.z.toJSONSchema(schema.Body, { reused: 'inline' }) })), (schema.Params && { params: v4_1.z.toJSONSchema(schema.Params, { reused: 'inline' }) })), (schema.Query && { querystring: v4_1.z.toJSONSchema(schema.Query, { reused: 'inline' }) })), (schema.Headers && { headers: v4_1.z.toJSONSchema(schema.Headers, { reused: 'inline' }) })), { response: v4_1.z.toJSONSchema(schema.Reply.partial(), { reused: 'inline' })['properties'] }), (schema.Security && { security: schema.Security })), (schema.Tags && { tags: schema.Tags }));
23
+ const finalResult = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (schema.Body && { body: v4_1.z.toJSONSchema(schema.Body, { reused: 'inline', target: "draft-7", io: 'input' }) })), (schema.Params && { params: v4_1.z.toJSONSchema(schema.Params, { reused: 'inline', target: "draft-7", io: 'input' }) })), (schema.Query && { querystring: v4_1.z.toJSONSchema(schema.Query, { reused: 'inline', target: "draft-7", io: 'input' }) })), (schema.Headers && { headers: v4_1.z.toJSONSchema(schema.Headers, { reused: 'inline', target: "draft-7", io: 'input' }) })), { response: v4_1.z.toJSONSchema(schema.Reply.partial(), { reused: 'inline', target: "draft-7" })['properties'] }), (schema.Security && { security: schema.Security })), (schema.Tags && { tags: schema.Tags }));
24
24
  return {
25
25
  schema: finalResult,
26
26
  handler,
@@ -17,7 +17,7 @@ const findStatusCode = (statusCode, availableStatusCodes) => {
17
17
  });
18
18
  };
19
19
  export const routeV4 = (schema, handler) => {
20
- const finalResult = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (schema.Body && { body: z.toJSONSchema(schema.Body, { reused: 'inline' }) })), (schema.Params && { params: z.toJSONSchema(schema.Params, { reused: 'inline' }) })), (schema.Query && { querystring: z.toJSONSchema(schema.Query, { reused: 'inline' }) })), (schema.Headers && { headers: z.toJSONSchema(schema.Headers, { reused: 'inline' }) })), { response: z.toJSONSchema(schema.Reply.partial(), { reused: 'inline' })['properties'] }), (schema.Security && { security: schema.Security })), (schema.Tags && { tags: schema.Tags }));
20
+ const finalResult = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (schema.Body && { body: z.toJSONSchema(schema.Body, { reused: 'inline', target: "draft-7", io: 'input' }) })), (schema.Params && { params: z.toJSONSchema(schema.Params, { reused: 'inline', target: "draft-7", io: 'input' }) })), (schema.Query && { querystring: z.toJSONSchema(schema.Query, { reused: 'inline', target: "draft-7", io: 'input' }) })), (schema.Headers && { headers: z.toJSONSchema(schema.Headers, { reused: 'inline', target: "draft-7", io: 'input' }) })), { response: z.toJSONSchema(schema.Reply.partial(), { reused: 'inline', target: "draft-7" })['properties'] }), (schema.Security && { security: schema.Security })), (schema.Tags && { tags: schema.Tags }));
21
21
  return {
22
22
  schema: finalResult,
23
23
  handler,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@efebia/fastify-zod-reply",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "fastify": "^5.3.0",