svelte-reflector 1.1.6 → 1.1.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.
|
@@ -9,10 +9,15 @@ export class PrimitiveProp {
|
|
|
9
9
|
emptyExample;
|
|
10
10
|
constructor(params) {
|
|
11
11
|
const { name, schemaObject, required, validator, isParam } = params;
|
|
12
|
-
const {
|
|
12
|
+
const { type: rawType } = schemaObject;
|
|
13
13
|
const type = rawType ?? "string";
|
|
14
14
|
this.emptyExample = this.getEmptyExample({ type, schemaObject });
|
|
15
|
-
const example =
|
|
15
|
+
const example = schemaObject.example ?? schemaObject.default;
|
|
16
|
+
if (isParam) {
|
|
17
|
+
if (name === "limit") {
|
|
18
|
+
console.log(example);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
16
21
|
const buildedType = type;
|
|
17
22
|
this.name = this.treatName(name);
|
|
18
23
|
this.rawType = type ?? "any";
|
package/dist/reflector.js
CHANGED
|
@@ -120,10 +120,10 @@ export class ReflectorFile {
|
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
if (!isValid) {
|
|
123
|
-
toast.error(
|
|
124
|
-
'Erro ao fazer a requisição',
|
|
125
|
-
'Um ou mais campos preenchidos estão incorretos.'
|
|
126
|
-
);
|
|
123
|
+
toast.error({
|
|
124
|
+
title: 'Erro ao fazer a requisição',
|
|
125
|
+
description: 'Um ou mais campos preenchidos estão incorretos.',
|
|
126
|
+
});
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
return isValid;
|