Add dedicated OData API support (extract & publish)
- Langage dominant
- TypeScript
- Étoiles
- 26
- Forks
- 9
- Merge moyen
- 1 j 3 h
- PR mergées (30 j)
- 20
Description
## Summary
apiops-cli currently handles OData APIs via the generic OpenAPI fallback path, which does not capture OData-specific artifacts. This issue tracks adding first-class OData support to both the extractor and publisher.
## Background
Azure API Management added OData API support, but tooling across the ecosystem has lagged behind (see [Azure/apiops#419](https://github.com/Azure/apiops/issues/419)). Users report that entity sets and functions are lost when extracting/publishing OData APIs.
## Current behavior
- **Extractor** (`api-extractor.ts`): No special-case handling for `odata` API type — it falls through to the generic `openapi-link` export, which misses OData-specific resources.
- **Publisher** (`api-publisher.ts`): Recognizes `odata` as a valid `apiType` string but has no OData-specific import format or schema handling.
- **APIM Client** (`apim-client.ts`): `getExportFormat()` returns `'openapi-link'` for OData via the `default` case — no dedicated export format.
## What needs to change
1. **Extract**: Add OData-specific handling in `api-extractor.ts` to export CSDL schemas, entity sets, and functions via the appropriate APIM export format.
2. **APIM Client**: Add an `'odata'` case to `getExportFormat()` returning the correct APIM export format for OData APIs (investigate whether APIM supports a dedicated OData/CSDL export link).
3. **Publish**: Add OData-specific import format handling in `getImportFormat()` so that CSDL schemas and entity sets are correctly imported on publish.
4. **Tests**: Add unit/integration tests covering OData extract and publish flows.
## Related
- [Azure/apiops#419](https://github.com/Azure/apiops/issues/419) — original feature request in the apiops toolkit repo
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez dans api-extractor.ts, api-publisher.ts et apim-client.ts, en retraçant la gestion existante de apiType et les chemins de getExportFormat()/getImportFormat(). Consultez la documentation des formats d’API APIM ou le comportement existant du client pour confirmer les formats d’exportation et d’importation OData/CSDL. La tâche est terminée lorsque les ensembles d’entités et les fonctions OData sont conservés lors de l’extraction et de la publication, avec des tests unitaires ou d’intégration couvrant les deux flux.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- azure, typescript
- Domaine
- api, cli
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100