<template>
    <div>
        <div v-for="tag in api.tags" :key="tag.name"><h1>{{ tag.name }}</h1> {{ tag.description }}</div>>
    </div>
</template>

<script>
import Axios from "axios";

export default {
    name: "ServiceApi",
    data: function() {
        return {
            api: {}
        };
    },
    props: ["sys"],
    created: function() {
        Axios.get(
            `${window.location.origin}/${this.sys}/v2/api-docs`,
            {}
        ).then(res => {
            this.api = res.data;
            console.log(this.api);
        });
    }
}
</script>
