mirror of
https://github.com/LukeHagar/OpenAPI.gg.git
synced 2025-12-06 04:20:29 +00:00
adjusted imports
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { localStoragePrefix, newSpec } from '$lib';
|
||||
import { setSpec } from '$lib/db';
|
||||
import { newSpec, setSpec } from '$lib/db';
|
||||
</script>
|
||||
|
||||
<button
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { newSpec } from '$lib';
|
||||
import { newSpec } from '$lib/db';
|
||||
import { db, setSpec, type APISpec } from '$lib/db';
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { newSpec } from '$lib';
|
||||
import { newSpec } from '$lib/db';
|
||||
import { db, setSpec, type APISpec } from '$lib/db';
|
||||
|
||||
export let spec: APISpec;
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import { openApiStore } from "$lib";
|
||||
import { blankSpec, openApiStore } from "$lib";
|
||||
import type { OpenAPIV3_1 } from "$lib/openAPITypes";
|
||||
import Dexie, { type Table } from 'dexie';
|
||||
import { writable, type Writable } from "svelte/store";
|
||||
|
||||
export const selectedSpec: Writable<APISpec | undefined> = writable(undefined)
|
||||
export const newSpec: APISpec = {
|
||||
name: 'OpenAPI',
|
||||
spec: blankSpec
|
||||
}
|
||||
|
||||
export const selectedSpec: Writable<APISpec | undefined> = writable(newSpec)
|
||||
|
||||
export const setSpec = (spec: APISpec) => {
|
||||
selectedSpec.set(spec);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { APISpec } from './db';
|
||||
import type { OpenAPIV3_1 } from './openAPITypes';
|
||||
import { writable, type Writable } from 'svelte/store';
|
||||
|
||||
@@ -40,11 +39,6 @@ export const blankSpec: OpenAPIV3_1.Document = {
|
||||
}
|
||||
}
|
||||
|
||||
export const newSpec: APISpec = {
|
||||
name: 'OpenAPI',
|
||||
spec: blankSpec
|
||||
}
|
||||
|
||||
export const operationCount = (openApiDoc: OpenAPIV3_1.Document) => {
|
||||
let count = 0;
|
||||
for (const path in openApiDoc.paths) {
|
||||
|
||||
Reference in New Issue
Block a user