feat: serve docs flat at /<repo>/ with no redirects
- collect.py copies each repo's built site contents directly to a top-level <repo>/ dir (was libs|apis|wiki/<repo>/site nesting) - nginx uses `index index.html lib/index.html api/index.html` so /dagpipe/ -> lib/index.html, /auth-server/ -> api/index.html are served internally with no redirects - _index regenerates links against the flat layout (/dagpipe/lib/, /auth-server/api/, /mongo-ops/, /blog/...) - config.yml static entries point at vendored blog/ + media-manager/ - Dockerfile copies per-repo dirs flat into the nginx html root - removed stale libs/, apis/, wiki/, tutorials/ category trees
This commit is contained in:
51
openapi-first/mcp/modules/openapi_first.codegen.json
Normal file
51
openapi-first/mcp/modules/openapi_first.codegen.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"module": "openapi_first.codegen",
|
||||
"content": {
|
||||
"path": "openapi_first.codegen",
|
||||
"docstring": "# Summary\n\nCore logic for generating Python source code from OpenAPI specifications.\n\nThis module provides reusable utilities for code generation, specifically\ngenerating Pydantic models and route handler stubs from OpenAPI 3.x schema\ndefinitions.",
|
||||
"objects": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.codegen.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"InputFileType": {
|
||||
"name": "InputFileType",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.codegen.InputFileType",
|
||||
"signature": "<bound method Alias.signature of Alias('InputFileType', 'datamodel_code_generator.InputFileType')>",
|
||||
"docstring": null
|
||||
},
|
||||
"PythonVersion": {
|
||||
"name": "PythonVersion",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.codegen.PythonVersion",
|
||||
"signature": "<bound method Alias.signature of Alias('PythonVersion', 'datamodel_code_generator.PythonVersion')>",
|
||||
"docstring": null
|
||||
},
|
||||
"generate": {
|
||||
"name": "generate",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.codegen.generate",
|
||||
"signature": "<bound method Alias.signature of Alias('generate', 'datamodel_code_generator.generate')>",
|
||||
"docstring": null
|
||||
},
|
||||
"generate_routes": {
|
||||
"name": "generate_routes",
|
||||
"kind": "function",
|
||||
"path": "openapi_first.codegen.generate_routes",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_routes', 'openapi_first.codegen_routes.generate_routes')>",
|
||||
"docstring": "Generate route handler stubs from an OpenAPI specification.\n\nCreates one ``<resource>.py`` file per resource in *output_dir*.\nResources are derived from the first path segment (e.g. ``/pets``\nand ``/pets/{id}`` both group under ``pets``).\n\nArgs:\n spec_path:\n Path to the OpenAPI specification file (YAML or JSON).\n output_dir:\n Directory where the generated route files are written.\n Created automatically if it does not exist.\n use_models:\n If ``True``, import Pydantic models from *models_module*\n for request-body schemas referenced via ``$ref``.\n models_module:\n Dotted Python module path from which to import models\n (e.g. ``\"models\"``, ``\"app.models\"``).\n\nReturns:\n list[Path]:\n Absolute paths of every generated route file.\n\nRaises:\n OpenAPISpecLoadError:\n If the spec cannot be loaded or validated.\n ValueError:\n If any operation is missing ``operationId``."
|
||||
},
|
||||
"generate_models": {
|
||||
"name": "generate_models",
|
||||
"kind": "function",
|
||||
"path": "openapi_first.codegen.generate_models",
|
||||
"signature": "<bound method Function.signature of Function('generate_models', 22, 51)>",
|
||||
"docstring": "Generate Pydantic models from an OpenAPI specification.\n\nArgs:\n spec_path (Path):\n Path to the OpenAPI specification file (YAML or JSON).\n output_path (Path):\n Path where the generated Python code should be written.\n pydantic_version (int, optional):\n The Pydantic version to target (1 or 2). Defaults to 2.\n\nNotes:\n **Reusability:**\n This function is designed to be used by the CLI and can be\n exposed as an MCP tool without modification."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user