@hasagi/schema 0.6.6 → 0.6.7

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.
@@ -238,7 +238,7 @@ function endpointToOperation(endpoint, schema) {
238
238
  if (endpoint.method === "GET" && !response.content) {
239
239
  response.content = {
240
240
  "application/json": {
241
- schema: {}
241
+ schema: { type: "object" }
242
242
  }
243
243
  };
244
244
  }
@@ -111,8 +111,11 @@ function getTypeBySchemaObject(schema, namespace) {
111
111
  return getArrayTypeBySchemaObject(schema, namespace).split("\n").join("\n\t");
112
112
  case "object":
113
113
  return getObjectTypeBySchemaObject(schema, namespace).split("\n").join("\n\t");
114
- default:
115
- return `${namespace}.${TYPE_OVERRIDES[schema.type]?.rename ? TYPE_OVERRIDES[schema.type].rename : schema.type}`;
114
+ default: {
115
+ if (schema.type === undefined)
116
+ return "unknown";
117
+ return `${namespace ? `${namespace}.` : ""}${schema.type}`;
118
+ }
116
119
  }
117
120
  }
118
121
  function getArrayTypeBySchemaObject(schema, namespace) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasagi/schema",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "keywords": [
5
5
  "hasagi"
6
6
  ],