Add nav structure to docs folder

This commit is contained in:
rijkvanzanten
2020-10-07 21:55:44 -04:00
parent 6057c9e5d1
commit e9f136bbb0
9 changed files with 251 additions and 32 deletions

View File

@@ -1,26 +0,0 @@
import api from '@/api';
import { ref } from '@vue/composition-api';
import { OpenAPIObject } from 'openapi3-ts';
const spec = ref<OpenAPIObject>();
const loading = ref(false);
const error = ref<any>(null);
export function useSpec() {
if (loading.value === false && !spec.value) fetchOAS();
return { spec, loading, error };
async function fetchOAS() {
loading.value = true;
try {
const response = await api.get('/server/specs/oas');
spec.value = response.data.data;
} catch (err) {
error.value = err;
} finally {
loading.value = false;
}
}
}