VirtoCommerce / vc-platform

Virto Commerce B2B Innovation Platform
https://virtocommerce.com
Other
1.23k stars 846 forks source link

Getting Resolver errors from swagger docs #2164

Closed busbina closed 3 years ago

busbina commented 3 years ago

When I browse to http://localhost:5000/docs/index.html and view the endpoint /api/carts/{cartId} the following errors show at the top of the swagger UI.

Resolver error at paths./api/carts/{cartId}.get.responses.200.content.text/plain.schema.properties.items.items.properties.price.properties.pricelist.properties.prices.items.$ref Could not resolve reference: Not Found Resolver error at paths./api/carts/{cartId}.get.responses.200.content.text/plain.schema.properties.shipments.items.properties.items.items.properties.lineItem.properties.price.properties.pricelist.properties.prices.items.$ref Could not resolve reference: Not Found Resolver error at paths./api/carts/{cartId}.get.responses.200.content.application/json.schema.properties.items.items.properties.price.properties.pricelist.properties.prices.items.$ref Could not resolve reference: Not Found Resolver error at paths./api/carts/{cartId}.get.responses.200.content.application/json.schema.properties.items.items.properties.price.properties.pricelist.properties.assignments.items.properties.pricelist.$ref Could not resolve reference: Not Found Resolver error at paths./api/carts/{cartId}.get.responses.200.content.text/plain.schema.properties.items.items.properties.price.properties.pricelist.properties.assignments.items.properties.pricelist.$ref Could not resolve reference: Not Found Resolver error at paths./api/carts/{cartId}.get.responses.200.content.application/json.schema.properties.items.items.properties.price.properties.pricelist.properties.assignments.items.properties.dynamicExpression.properties.children.items.properties.availableChildren.items.$ref Could not resolve reference: Not Found Resolver error at paths./api/carts/{cartId}.get.responses.200.content.application/json.schema.properties.items.items.properties.price.properties.pricelist.properties.assignments.items.properties.dynamicExpression.properties.children.items.properties.children.items.$ref Could not resolve reference: Not Found Resolver error at paths./api/carts/{cartId}.get.responses.200.content.application/json.schema.properties.items.items.properties.price.properties.pricelist.properties.assignments.items.properties.dynamicExpression.properties.availableChildren.items.properties.availableChildren.items.$ref Could not resolve reference: Not Found Resolver error at paths./api/carts/{cartId}.get.responses.200.content.application/json.schema.properties.items.items.properties.price.properties.pricelist.properties.assignments.items.properties.dynamicExpression.properties.availableChildren.items.properties.children.items.$ref Could not resolve reference: Not Found

Steps to reproduce Steps to reproduce the behavior:

  1. Download VirtoCommerce.Platform.3.45.0.zip
  2. Edit the appsettings.json to point at a blank database
  3. Start the app using dotnet VirtoCommerce.Platform.Web.dll --urls=http://localhost:5000
  4. login using the default credentials
  5. Select empty store or generate sample data, it doesn't matter
  6. Let the store setup
  7. Restart once the store is setup
  8. Navigate to http://localhost:5000/docs/index.html
  9. Expand "Shopping cart module"
  10. Click on "GET ​/api​/carts​/{cartId}"
  11. A large red error block will appear at the top of the UI.

Expected behavior No errors appear

Screenshots (optional) Screenshot 2021-02-19 130045

Version info (please complete the following information):

mvktsk commented 3 years ago

Task https://virtocommerce.atlassian.net/browse/VP-7136 has been created

akak1977 commented 3 years ago

Yes, we know about this issue. There is no problem with the schema, this is an old bug in swagger UI when the schema contains recursively defined type references. Hope they repair it one day.

busbina commented 3 years ago

Yes, we know about this issue. There is no problem with the schema, this is an old bug in swagger UI when the schema contains recursively defined type references. Hope they repair it one day.

Awesome, thanks for taking a look. It doesn't seem to be affecting anything.