-
openapi-spec-reader (#10)
released this
2026-06-04 17:23:44 +00:00 | 9 commits to main since this releaseSummary of Changes:
- Spec-Driven Enums:
- Updated
openapi_loader.tsto collect all standalone enum schemas (e.g.,FetchRequestStatus) into theAppConfig.enumsmap. - Implemented
mergePropertiesandoneOf/anyOfresolution inopenapi_loader.tsto ensure complex schemas likeFetchRequest(usingallOf) andsource(usingoneOf) are correctly parsed.
- Updated
- Customizable Labeling:
- Added
enumOption(template-based) andenumLabels(mapping-based) to the config and field types. - Implemented
resolveTemplateinutils/options.tsto handle placeholders like'{name} {number}'or plain field names.
- Added
- UI Integration:
FormField.tsx: Updated relation and enum selects to usegetFieldOptions()for correct key/value pairs and labels. Added value normalization to extract keys from API objects.EnhancedTable.tsx: UpdatedvalueOptionsto use key/value pairs forsingleSelectand updatedFieldRendererto show the human-readable label for enums.FilterBar.tsx: UpdatedextractOptionsto use spec-driven labels for enum filters.ResourceView.tsx: Centralized filter matching logic into agetDisplayStringhelper, ensuring filter comparisons use the same templates as the UI labels.
- App Fixes:
FetchRequests.tsxandFetchRequestDetail.tsxnow derive status and format options from the OpenAPI spec viauseConfig()instead of using hardcoded arrays.
Reviewed-on: #10
Co-authored-by: Vishesh 'ironeagle' Bangotra aetoskia@gmail.com
Co-committed-by: Vishesh 'ironeagle' Bangotra aetoskia@gmail.comDownloads
- Spec-Driven Enums: