Akryum / Akryum/moquerie

Work with types generated from OpenAPI

Offen
#2 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
211
Forks
3
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi
I experiment using [moquerie](https://github.com/Akryum/moquerie) using one of my projects.
The UI looks beautiful and it seems useful - so thank you for your amazing work 💪

My config looks like:
`moquerie.config.ts`:
```ts
import { defineConfig } from "moquerie/config";

export default defineConfig({
// API port
server: {
port: 4002,
},
rest: {
typeFiles: ["src/lib/api/api.d.ts","src/lib/api/a.ts","src/lib/api/file.ts"],
},
});

```

I generate types from my backend OpenAPI using [openapi-typescript](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-typescript) package. So I got a file named `api.d.ts`.

But when I try to import types from `.d.ts` it does not appear in the resources tab.

I have other few issues:
- I created a file `file.ts` with `export type Test = { a: number };` but I cannot see it in the resources tab. It only resolves interfaces, not types.
- I cannot import stuff from `api.d.ts`

Is there an example of using it with .d.ts or the ability to resolve interfaces?
BTW - I couldn't find a way to reset my data in moqueire - so I cannot delete my mock / factory.

Thanks!

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.