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.

File typescript CoreAstro RoutingSystem 1 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  1ccfc564_4697_b268_7181_cb2e9e854bbd["[...slug].json.ts"]
  f16d8c76_2866_6150_bd14_0347b59abfe9["astro"]
  1ccfc564_4697_b268_7181_cb2e9e854bbd --> f16d8c76_2866_6150_bd14_0347b59abfe9
  style 1ccfc564_4697_b268_7181_cb2e9e854bbd 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' } }];
}

Domain

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 CoreAstro domain, RoutingSystem 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/integrations/cloudflare/test/fixtures/routing-priority/src/pages/api/catch/[...slug].json.ts (domain: CoreAstro, subdomain: RoutingSystem, directory: packages/integrations/cloudflare/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