Skip to content

Commit

Permalink
Update editor.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Oct 29, 2024
1 parent 71a18d2 commit 26e6c31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
12 changes: 3 additions & 9 deletions website/pages/docs/editor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Swagger-UI with Cloud TypeScript Editor with embedded SDK.

`@nestia/editor` is a combination of Swagger-UI and web-based TypeScript editor (of [StackBlitz](https://stackblitz.com/)) embedding [SDK (Software Development Kit) library](./sdk/sdk) generated by [`@nestia/migrate`](./migrate) from an OpenAPI document. With the `@nestia/editor`, you can easily test the backend API with TypeScript code, and it is much convenient than the traditional way of using Swagger UI, due to type checking and auto-completion of the TypeScript.

Also, `@nestia/editor` provides [Mockup Simulator](./sdk/simulator). With the simulator, you can start the frontend (or client) development even when the backend API has not been ready yet. Furthermore, `@nestia/editor` supports automatic [e2e (end-to-end) test functions' generation](./sdk/e2e), so that you can easily validate the API with the generated test code.
Also, `@nestia/editor` provides [Mockup Simulator](./sdk/simulator) of the backend API functions. With the mockup simulator, you can start the frontend (or client) development even when the backend API functions have not been implemented yet. Furthermore, `@nestia/editor` supports automatic [e2e (end-to-end) test functions' generation](./sdk/e2e), so that you can easily validate the backend API functions with the automatically generated test codes.

Here are the some example projects generated by `@nestia/editor`. Traveling those example projects, you may understand how to utilize the `@nestia/editor`. Let's start the type safe API interaction development with `@nestia/editor`!

Expand All @@ -23,15 +23,9 @@ Here are the some example projects generated by `@nestia/editor`. Traveling thos
<ul>
{EDITOR_EXAMPLES.map((example) => (
<li>
{example.title}{": "}
<a href={`/editor/?url=${encodeURIComponent(example.swagger)}&simulate=true&e2e=true`}
target="_blank">
SDK & Simulator
</a>
{" / "}
<a href={`/editor/?url=${encodeURIComponent(example.swagger)}&simulate=true&e2e=true&mode=nest`}
target="_blank">
NestJS Project
{example.title}
</a>
</li>
))}
Expand Down Expand Up @@ -102,7 +96,7 @@ If you wanna see the example cases of the `<iframe>` embedding, let's see the be
{example.title}{": "}
<a href={`/editor/?url=${encodeURIComponent(example.swagger)}&simulate=true&e2e=true`}
target="_blank">
https://nestia.io/editor/?url={example.swagger.split("/").at(-1)}&simulate=true&e2e=true
https://nestia.io/editor/?url={example.swagger.split("/").at(-1)}
</a>
</li>
))}
Expand Down
12 changes: 1 addition & 11 deletions website/src/constants/EDITOR_EXAMPLES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const EDITOR_EXAMPLES: IAsset[] = [
{
title: "BBS (Bullet-in Board System)",
swagger:
"https://raw.githubusercontent.com/samchon/openapi/refs/heads/master/examples/v3.1/example.json",
"https://raw.githubusercontent.com/samchon/openapi/refs/heads/master/examples/v3.1/bbs.json",
},
{
title: "Shopping Mall",
Expand All @@ -29,16 +29,6 @@ export const EDITOR_EXAMPLES: IAsset[] = [
swagger:
"https://raw.githubusercontent.com/samchon/openapi/refs/heads/master/examples/v3.0/openai.json",
},
{
title: "아임포트",
swagger:
"https://raw.githubusercontent.com/samchon/payments/refs/heads/master/packages/fake-iamport-server/packages/api/swagger.json",
},
{
title: "토스페이먼츠",
swagger:
"https://raw.githubusercontent.com/samchon/payments/refs/heads/master/packages/fake-toss-payments-server/packages/api/swagger.json",
},
];
interface IAsset {
title: string;
Expand Down

0 comments on commit 26e6c31

Please sign in to comment.