Merge pull request #9849 from demarches-simplifiees/use_spectaql
Tech: utilsation de spectaql en remplacement de graphdoc pour la conversion du schema graphql en html
This commit is contained in:
commit
adb161466e
3 changed files with 2130 additions and 534 deletions
10
package.json
10
package.json
|
@ -62,6 +62,7 @@
|
|||
"react-popper": "^2.3.0",
|
||||
"react-query": "^3.39.3",
|
||||
"sortablejs": "^1.15.0",
|
||||
"spectaql": "^2.3.0",
|
||||
"stimulus-use": "^0.52.0",
|
||||
"terser": "^5.18.2",
|
||||
"tiny-invariant": "^1.3.1",
|
||||
|
@ -74,7 +75,6 @@
|
|||
"zod": "^3.20.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@2fd/graphdoc": "^2.4.0",
|
||||
"@types/debounce": "^1.2.1",
|
||||
"@types/geojson": "^7946.0.10",
|
||||
"@types/is-hotkey": "^0.1.7",
|
||||
|
@ -110,7 +110,7 @@
|
|||
"lint:js": "eslint --ext .js,.jsx,.ts,.tsx ./app/javascript",
|
||||
"webpack:build": "NODE_ENV=production bin/webpack",
|
||||
"lint:types": "tsc",
|
||||
"graphql:doc:build": "RAILS_ENV=production bin/rake graphql:schema:json && graphdoc --force",
|
||||
"graphql:doc:build": "RAILS_ENV=production bin/rake graphql:schema:idl && spectaql spectaql_config.yml",
|
||||
"postinstall": "patch-package",
|
||||
"test": "vitest",
|
||||
"coverage": "vitest run --coverage"
|
||||
|
@ -118,8 +118,8 @@
|
|||
"engines": {
|
||||
"node": ">= 18.17.0"
|
||||
},
|
||||
"graphdoc": {
|
||||
"schemaFile": "./app/graphql/schema.json",
|
||||
"output": "./public/graphql/schema"
|
||||
"resolutions": {
|
||||
"string-width": "4.2.2",
|
||||
"wrap-ansi": "7.0.0"
|
||||
}
|
||||
}
|
||||
|
|
27
spectaql_config.yml
Normal file
27
spectaql_config.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
spectaql:
|
||||
displayAllServers: true
|
||||
targetDir: public/graphql/schema
|
||||
|
||||
introspection:
|
||||
removeTrailingPeriodFromDescriptions: false
|
||||
schemaFile: app/graphql/schema.graphql
|
||||
|
||||
extensions:
|
||||
graphqlScalarExamples: true
|
||||
|
||||
info:
|
||||
title: Schema de l'API GraphQL de demarches-simplifiees.fr
|
||||
description: détails des apis
|
||||
contact:
|
||||
name: équipe support
|
||||
url: https://doc.demarches-simplifiees.fr/api-graphql
|
||||
email: contact@demarches-simplifiees.fr
|
||||
|
||||
servers:
|
||||
- url: https://www.demarches-simplifiees.fr/api/v2/graphql
|
||||
description: Production
|
||||
production: true
|
||||
headers:
|
||||
- name: Authorization
|
||||
example: Bearer <YOUR_TOKEN_HERE>
|
||||
comment: Create your token in https://www.demarches-simplifiees.fr/profil
|
Loading…
Add table
Reference in a new issue