We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Platform version(s) affected: "0.12.0",
Description When parsing https://netcoreblockly.herokuapp.com/swagger/v1/swagger.json it gives error when reading "properties" in
\node_modules@api-platform\api-doc-parser\lib\openapi3\handleJson.js
var properties = schema.properties;
The tags does not show always the schema.
var title = responsePathItem.tags[0];
If you look at the json https://netcoreblockly.herokuapp.com/swagger/v1/swagger.json the tags[0] is DB_Departments "/api/DB_Departments": { "get": { "tags": [ "DB_Departments" ],
This is not in the "components": { "schemas": {
Rather, the program should be reading from responses: "items": { "$ref": "#/components/schemas/Department" }
How to reproduce
const SwaggerParser = require("@api-platform/api-doc-parser/lib/openapi3/parseOpenApi3Documentation"); var q = await SwaggerParser.default('https://netcoreblockly.herokuapp.com/swagger/v1/swagger.json');
Possible Solution
As an workaround, until a real solve, we can try to alleviate by parsing what we can
var schema = response.components.schemas[title]; //added code if(schema == undefined){ console.error ('cannot find schema for ' + title) return null; } //more code return resources.filter(it=>it != null);
Additional Context
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
API Platform version(s) affected: "0.12.0",
Description
When parsing https://netcoreblockly.herokuapp.com/swagger/v1/swagger.json it gives error when reading "properties" in
\node_modules@api-platform\api-doc-parser\lib\openapi3\handleJson.js
var properties = schema.properties;
The tags does not show always the schema.
var title = responsePathItem.tags[0];
If you look at the json https://netcoreblockly.herokuapp.com/swagger/v1/swagger.json the tags[0] is DB_Departments
"/api/DB_Departments": {
"get": {
"tags": [
"DB_Departments"
],
This is not in the "components": {
"schemas": {
Rather, the program should be reading from responses:
"items": {
"$ref": "#/components/schemas/Department"
}
How to reproduce
Possible Solution
As an workaround, until a real solve, we can try to alleviate by parsing what we can
Additional Context
The text was updated successfully, but these errors were encountered: