[SOLVED] Swagger - api path segment missing in requests


#1

I have…

  • [ ] Checked the logs and have provided uploaded a log file and provided a link because I found something suspicious there.

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

Imported swagger.json into postman but when I try to run an API request I get a 404.

Expected behavior

I should be able to receive the results from the API.

Minimal reproduction of the problem

  1. Go to API UI for your app in Squidex UI
  2. Copy the swagger.json URI
  3. Import the URI in Postman
  4. Send a GET request in Postman

Environment

  • [ x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: [VERSION]

Browser:

  • [ x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

It seems that in later versions the request URI is missing the api/ part.

Example:

Before:
{{domain}}/api/content/blog/blog-post <- works

Later Squidex builds:
{{domain}}/content/blog/blog-post <- not working (404) - api/ path segment missing here!


#2

Thank you, will fix it today. It is only the content I guess?


#3

That’s the only thing that I have tested, yes.


#4

Thanks, NSwag makes me crazy. Every update is an improvement, but has at least one major breaking change :frowning:


#5

No problem, happy to help.


#6

I have pushed a potential fix.