Skip to content
New issue

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

Catalog API's - GetCategoryTree Type - (pub/category/tree/{categoryLevels}) - MetaTagDescription not typesafe (Is Nullable) #1365

Open
devhmac opened this issue Dec 11, 2024 · 1 comment

Comments

@devhmac
Copy link

devhmac commented Dec 11, 2024

Describe the bug
Current Catalog OpenAPI spec defines MetaTagDescription as a guaranteed String response, however it is nullable.
https://developers.vtex.com/api/openapi/catalog-api
https://github.com/vtex/openapi-schemas/blob/master/VTEX%20-%20Catalog%20API.json

Current documentation for endpoint also notes
MetaTagDescription* - String indicating it is required in the response, however in the demo request example to https://apiexamples.vtexcommercestable.com.br/api/catalog_system/pub/category/tree/{categoryLevels} it returns instances with MetaTagDescription = null

Expected behavior
Expect stated response specification to be accurate - either non-nullable String field (Probably hard) or mark MetaTagDescription as String or null in OpenAPI schema and documentaion

Screenshots
If applicable, add screenshots to help explain your problem.
image
Request to https://apiexamples.vtexcommercestable.com.br/api/catalog_system/pub/category/tree/{2}
image

@devhmac devhmac changed the title Catalog API's - GetCategoryTree Type - (pub/category/tree/{categoryLevels}) Nullable Catalog API's - GetCategoryTree Type - (pub/category/tree/{categoryLevels}) - MetaTagDescription Nullable Dec 11, 2024
@devhmac devhmac changed the title Catalog API's - GetCategoryTree Type - (pub/category/tree/{categoryLevels}) - MetaTagDescription Nullable Catalog API's - GetCategoryTree Type - (pub/category/tree/{categoryLevels}) - MetaTagDescription not typesafe (Is Nullable) Dec 11, 2024
@devhmac
Copy link
Author

devhmac commented Dec 11, 2024

One more addition, appears the Recursive types of GetCategoryTreeChild.children resolves to {}, instead of GetCategoryTreeChild, which I believe is the intended type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant