Skip to content

Commit

Permalink
chore: simplify playground
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Nov 11, 2024
1 parent d9b3aee commit 06efbed
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 0 additions & 2 deletions playground/.env.example

This file was deleted.

4 changes: 2 additions & 2 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export default defineNuxtConfig({
apiParty: {
endpoints: {
jsonPlaceholder: {
url: process.env.JSON_PLACEHOLDER_BASE_URL!,
url: 'https://jsonplaceholder.typicode.com',
},
petStore: {
url: process.env.PET_STORE_BASE_URL!,
url: 'https://petstore3.swagger.io/api/v3',
schema: './schemas/petStore.yaml',
},
},
Expand Down
22 changes: 16 additions & 6 deletions playground/pages/petStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,33 @@ async function abandonGarfield() {
Update
</button>
</p>
<hr>

<h2>usePetStoreData</h2>
<p>Status: {{ status }}</p>
<p>
<button @click="status = availableStatus[status ? availableStatus.indexOf(status) + 1 % 3 : 0]">
Next status
</button>
</p>
<p>
<button

<h3>Pets</h3>
<ul>
<li
v-for="pet in data"
:key="pet.id"
@click="fetchPetData(pet.id!)"
>
{{ pet.name }}
</button>
</p>
<button
@click="fetchPetData(pet.id!)"
>
{{ pet.name }}
</button>
</li>
</ul>
<pre>{{ JSON.stringify(petData, undefined, 2) }}</pre>
<hr>

<h3>Abandon Garfield</h3>
<p>
<button @click="abandonGarfield">
Put up Garfield
Expand Down

0 comments on commit 06efbed

Please sign in to comment.