We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35ede39 commit 7a2c64dCopy full SHA for 7a2c64d
1 file changed
README.md
@@ -173,15 +173,21 @@ model User {
173
}
174
`;
175
176
-const { yaml, json } = await generateOpenApiSchema({
177
- prismaSchema: schema,
+// Returns YAML by default
+const yamlOutput = await generateOpenApiSchema(schema, {
178
title: "My API",
179
description: "Generated via SDK",
180
- generateYaml: true,
+});
181
+
182
+// Or generate JSON output
183
+const jsonOutput = await generateOpenApiSchema(schema, {
184
+ title: "My API",
185
+ description: "Generated via SDK",
186
+ generateYaml: false,
187
generateJson: true,
188
});
189
-console.log(yaml);
190
+console.log(yamlOutput);
191
```
192
193
0 commit comments