AppFlowy-IO / AppFlowy-IO/AppFlowy-Docs
OpenAPI schema feedback : paths/gotrue_token.yaml does not exist
- Dominant language
- No language data
- Stars
- 109
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
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.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in documentation/appflowy-cloud/openapi/openapi.yaml, especially the reference to ./paths/gotrue_token.yaml, and reproduce the failure with the openapi-generator-cli validate command. Trace the referenced files and the schema-generation context; done means a fresh clone validates without the missing-reference error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100