Home / File/ [...slug].json.ts — astro Source File

[...slug].json.ts — astro Source File

Architecture documentation for [...slug].json.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  280b970c_7238_b31a_6a22_934fe958ecb3["[...slug].json.ts"]
  f16d8c76_2866_6150_bd14_0347b59abfe9["astro"]
  280b970c_7238_b31a_6a22_934fe958ecb3 --> f16d8c76_2866_6150_bd14_0347b59abfe9
  style 280b970c_7238_b31a_6a22_934fe958ecb3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { APIRoute } from 'astro';

export const GET: APIRoute = async ({ params }) => {
  return new Response(
    JSON.stringify({
      path: params.slug,
    })
  );
};

export function getStaticPaths() {
  return [{ params: { slug: 'a' } }, { params: { slug: 'b/c' } }];
}

Subdomains

Dependencies

  • astro

Frequently Asked Questions

What does [...slug].json.ts do?
[...slug].json.ts is a source file in the astro codebase, written in typescript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in [...slug].json.ts?
[...slug].json.ts defines 2 function(s): GET, getStaticPaths.
What does [...slug].json.ts depend on?
[...slug].json.ts imports 1 module(s): astro.
Where is [...slug].json.ts in the architecture?
[...slug].json.ts is located at packages/astro/test/fixtures/routing-priority/src/pages/api/catch/[...slug].json.ts (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/routing-priority/src/pages/api/catch).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free