Azure / Azure/data-api-builder
[BUG]: (NotFound) while fetching schema
- Langage dominant
- C#
- Étoiles
- 1.5k
- Forks
- 370
- Merge moyen
- 3 j 22 h
- PR mergées (30 j)
- 9
Description
## What's wrong?
Running `dab validate` fails to download our schema.
## What happened?
```sh
C:\Temp\dab-harness>dab validate -c dab-config.json
Information: Microsoft.DataApiBuilder 1.5.56
Information: User provided config file: dab-config.json
Information: Validating config file: dab-config.json
Loading config file from C:\Temp\dab-harness\dab-config.json.
Warning: Received response: (NotFound) while fetching schema from url: https://github.com/Azure/data-api-builder/releases/download/v1.5.56/dab.draft.schema.json
Information: The config satisfies the schema requirements.
Information: Validating entity relationships.
Information: Config is valid.
```
Not quite sure how this is only a warning. But it should not occur at all.
## Version
```sh
C:\Temp\dab-harness>dab --version
Microsoft.DataApiBuilder 1.5.56+61c726a0fc38ab5a1d9e52cc3593bbd2a8633aec
```
## Configuration
```sh
C:\Temp\dab-harness>cd "c:\Temp\dab-harness" && dab init --database-type mssql --connection-string "@env('MSSQL_CONNECTION_STRING')" --host-mode development --rest.enabled true --graphql.enabled true --auth.provider StaticWebApps -c "dab-config.json"
Information: Microsoft.DataApiBuilder 1.5.56
Information: Generating user provided config file with name: dab-config.json
Information: Config file generated.
Information: SUGGESTION: Use 'dab add [entity-name] [options]' to add new entities in your config.
c:\Temp\dab-harness>cd "c:\Temp\dab-harness" && dab configure --runtime.cache.enabled true -c "dab-config.json"
Information: Microsoft.DataApiBuilder 1.5.56
Information: User provided config file: dab-config.json
Loading config file from c:\Temp\dab-harness\dab-config.json.
Information: Updated RuntimeConfig with Runtime.Cache.Enabled as 'True'
Information: Successfully updated runtime settings in the config file.
```
```json
{
"$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.5.56/dab.draft.schema.json",
"data-source": {
"database-type": "mssql",
"connection-string": "@env('MSSQL_CONNECTION_STRING')"
},
"runtime": {
"rest": {
"enabled": true,
"path": "/api",
"request-body-strict": true
},
"graphql": {
"enabled": true,
"path": "/graphql",
"allow-introspection": true
},
"host": {
"cors": {
"origins": [],
"allow-credentials": false
},
"authentication": {
"provider": "StaticWebApps"
},
"mode": "development"
},
"cache": {
"enabled": true
}
},
"entities": {}
}
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Reproduisez l’échec avec la commande `dab validate -c dab-config.json` et la configuration indiquées, puis suivez l’URL du schéma et le comportement de récupération signalé dans la sortie. Vérifiez pourquoi l’URL du schéma pour v1.5.56 renvoie NotFound ; le travail est terminé lorsque la validation n’émet plus cet avertissement et que le schéma est récupéré ou que l’échec est géré comme prévu.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp
- Domaine
- cli
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100