Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APISymbol ¶
type APISymbol struct {
Method string // "get", "post", "put", "delete"
Parameters []ParamSymbol // path/query parameters
RequestFields map[string]string // field name → type
ResponseFields map[string]FieldSymbol // field name → type info
// Phase 5: x- extensions
Pagination *PaginationExt
Sort *SortExt
Filter *FilterExt
}
APISymbol represents a single OpenAPI operation.
type CustomSymbol ¶
CustomSymbol holds exported function names from a custom.ts file.
func LoadCustomTS ¶
func LoadCustomTS(path string) (*CustomSymbol, error)
LoadCustomTS parses a custom.ts file and extracts exported function names.
type FieldSymbol ¶
type FieldSymbol struct {
Type string // "string", "integer", "array", "object"
ItemType string // item type if array
}
FieldSymbol represents a response field with type info.
type FilterExt ¶
type FilterExt struct {
Allowed []string
}
FilterExt represents x-filter extension.
type PaginationExt ¶
PaginationExt represents x-pagination extension.
type ParamSymbol ¶
ParamSymbol represents an OpenAPI parameter.
type SymbolTable ¶
SymbolTable holds all symbols extracted from OpenAPI and custom.ts.
func LoadOpenAPI ¶
func LoadOpenAPI(path string) (*SymbolTable, error)
LoadOpenAPI parses an OpenAPI YAML file and builds a SymbolTable.
type ValidationError ¶
type ValidationError struct {
File string // source HTML filename
Attr string // attribute context (e.g. `data-fetch="Login"`)
Message string // human-readable error
}
ValidationError represents a single validation failure.
func Validate ¶
func Validate(pages []parser.PageSpec, projectRoot string) []ValidationError
Validate checks parsed PageSpecs against an OpenAPI spec and custom.ts files. projectRoot is the project root containing api/openapi.yaml and frontend/.
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Source Files
¶
- apply_extensions.go
- build_api_symbol.go
- check_bind_field.go
- check_each_field.go
- collect_inline_request_fields.go
- collect_inline_response_fields.go
- collect_operations.go
- collect_params.go
- collect_request_fields.go
- collect_response_fields.go
- contains_str.go
- err_bind_not_found.go
- err_component_not_found.go
- err_each_not_array.go
- err_each_not_found.go
- err_field_not_found.go
- err_filter_not_allowed.go
- err_op_not_found.go
- err_paginate_no_ext.go
- err_param_not_found.go
- err_sort_not_allowed.go
- err_wrong_method.go
- has_matching_param.go
- load_custom_ts.go
- load_openapi.go
- method_validation_error_error.go
- ref_name.go
- resolve_response_fields.go
- resolve_schema_fields.go
- to_field_symbol.go
- type_api_symbol.go
- type_custom_symbol.go
- type_field_symbol.go
- type_filter_ext.go
- type_openapi_doc.go
- type_openapi_media_type.go
- type_openapi_operation.go
- type_openapi_param.go
- type_openapi_request_body.go
- type_openapi_response.go
- type_openapi_schema.go
- type_pagination_ext.go
- type_param_symbol.go
- type_sort_ext.go
- type_symbol_table.go
- type_validation_error.go
- type_yaml_filter_ext.go
- type_yaml_pagination_ext.go
- type_yaml_sort_ext.go
- validate.go
- validate_action_block.go
- validate_child_actions.go
- validate_component.go
- validate_fetch_binds.go
- validate_fetch_block.go
- validate_fetch_eaches.go
- validate_infra_params.go
- validate_nested_fetches.go
- validate_params.go