AppFlowy-IO / AppFlowy-IO/AppFlowy-Docs

OpenAPI schema feedback : paths/gotrue_token.yaml does not exist

Ouverte
#209 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Aucune donnée de langage
Étoiles
109
Forks
108
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

We have seen the release of an OpenAPI schema last week in:

- https://github.com/AppFlowy-IO/AppFlowy/issues/1906

A quick glance at the configuration for its generation shows a reference to a file, which is not part of the git tree:

https://github.com/AppFlowy-IO/AppFlowy-Docs/blob/25b257ed20e86ededcf0337049fc07d7247d6e34/documentation/appflowy-cloud/openapi/openapi.yaml#L15

From glancing over it, all the other files appear to exist.

Ideally this is generated in CI and automatically generated from the server code base, in so no drift can be expected.

The error can be reproduced locally on a fresh clone of this repository in the documentation/appflowy-cloud/openapi path with:

```sh
$ npx @openapitools/openapi-generator-cli validate -i openapi.yaml
Validating spec (openapi.yaml)
[main] WARN io.swagger.v3.parser.OpenAPIV3Parser - Exception while resolving:
java.lang.RuntimeException: Unable to load RELATIVE ref: ./paths/gotrue_token.yaml path: /home/yala/src/github.com/AppFlowy-IO/AppFlowy-Docs/documentation/appflowy-cloud/openapi
at io.swagger.v3.parser.util.RefUtils.readExternalRef(RefUtils.java:220)
at io.swagger.v3.parser.ResolverCache.loadRef(ResolverCache.java:156)
at io.swagger.v3.parser.processors.ExternalRefProcessor.processRefToExternalPathItem(ExternalRefProcessor.java:273)
at io.swagger.v3.parser.processors.PathsProcessor.processReferencePath(PathsProcessor.java:325)
at io.swagger.v3.parser.processors.PathsProcessor.processPaths(PathsProcessor.java:65)
at io.swagger.v3.parser.OpenAPIResolver.resolve(OpenAPIResolver.java:72)
at io.swagger.v3.parser.OpenAPIResolver.resolve(OpenAPIResolver.java:59)
at io.swagger.v3.parser.OpenAPIV3Parser.resolve(OpenAPIV3Parser.java:240)
at io.swagger.v3.parser.OpenAPIV3Parser.readContents(OpenAPIV3Parser.java:183)
at io.swagger.v3.parser.OpenAPIV3Parser.readLocation(OpenAPIV3Parser.java:97)
at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:16)
at org.openapitools.codegen.cmd.Validate.execute(Validate.java:52)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Caused by: java.lang.RuntimeException: Could not find ./paths/gotrue_token.yaml on the classpath
at io.swagger.v3.parser.util.ClasspathHelper.loadFileFromClasspath(ClasspathHelper.java:33)
at io.swagger.v3.parser.util.RefUtils.readExternalRef(RefUtils.java:214)
... 13 common frames omitted
Errors:
- Unable to load RELATIVE ref: ./paths/gotrue_token.yaml path:
/home/yala/src/github.com/AppFlowy-IO/AppFlowy-Docs/documentation/appflowy-cloud/openapi

[error] Spec has 1 errors.
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.