zudoku 0.4.4-dev.10 → 0.4.4-dev.12

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.4.4-dev.10",
3
+ "version": "0.4.4-dev.12",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -76,7 +76,7 @@ const getAllTags = (schema: OpenAPIDocument): TagObject[] => {
76
76
  .flatMap((path) => Object.values(path ?? {}))
77
77
  .flatMap((operation) =>
78
78
  typeof operation === "object" && "tags" in operation
79
- ? operation.tags ?? []
79
+ ? (operation.tags ?? [])
80
80
  : [],
81
81
  );
82
82
 
@@ -422,7 +422,7 @@ const loadOpenAPISchema = async (input: NonNullable<unknown>) => {
422
422
  };
423
423
 
424
424
  const SchemaSource = builder.enumType("SchemaType", {
425
- values: ["url", "json", "yaml"] as const,
425
+ values: ["url", "file"] as const,
426
426
  });
427
427
 
428
428
  builder.queryType({
@@ -155,7 +155,7 @@ export type SchemaTag = {
155
155
  operations: Array<OperationItem>;
156
156
  };
157
157
 
158
- export type SchemaType = "json" | "url" | "yaml";
158
+ export type SchemaType = "file" | "url";
159
159
 
160
160
  export type TagItem = {
161
161
  __typename?: "TagItem";
@@ -68,8 +68,10 @@ const MethodColorMap: Record<string, keyof typeof ColorMap> = {
68
68
  head: "gray",
69
69
  };
70
70
 
71
+ export type OpenApiPluginOptions = OasPluginConfig & InternalOasPluginConfig;
72
+
71
73
  export const openApiPlugin = (
72
- config: OasPluginConfig & InternalOasPluginConfig,
74
+ config: OpenApiPluginOptions,
73
75
  ): DevPortalPlugin => {
74
76
  const basePath = joinPath(config.navigationId ?? "/reference");
75
77
 
@@ -1,7 +1,4 @@
1
- type OasSource =
2
- | { type: "url"; input: string }
3
- | { type: "yaml"; input: string }
4
- | { type: "json"; input: object };
1
+ type OasSource = { type: "url"; input: string } | { type: "file"; input: any };
5
2
 
6
3
  export type OasPluginConfig = {
7
4
  server?: string;