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

FIX - scopeID definition in openapi file #3907

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

Agnul97
Copy link
Contributor

@Agnul97 Agnul97 commented Nov 17, 2023

On swaggerUI sometimes it happens that if you open a certain path/operation you can see, for example, that the scopeID field is not shown with the “_” default value. Furthermore, trying to call the operation inside swagger fails in an infinite loop. Refreshing the page the thing is fixed. This error can be emulated in this swagger UI https://api-qat-1.dev.everyware.io/doc/#/.

Initially, I thought this was a problem regarding the swaggerUI version we use but in the end, after trying to update it to the latest version, I started to realize that maybe there was a problem with the definition of the scopeID in the openAPI.yaml file.

Syntactically, the definition should not be wrong (in fact, for example, is not signaled in the various warnings that swagger shows regarding syntactic problems) but at the same time if I change it as I've done in this PR the problem I exposed above is fixed. I suppose this problem is caused by the fact the the "allOf" operator (https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/#allof) expects schemas in input, and the "default" operator is not technically a schema. But at the same time, I've seen in other parts of the API definition a similar thing done with other operators that are not "schemas" and the result is not wrong.

In the end, the mod. I've done is AT WORST equivalent to the previous scopeID definition BUT with this mod. the problem I exposed is solved.

@Coduz Coduz added Bug This is a bug or an unexpected behaviour. Fix it! Documentation Doc... What?? Joke! We will write some! labels Nov 17, 2023
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Merging #3907 (10c7650) into develop (76cd70c) will not change coverage.
The diff coverage is n/a.

❗ Current head 10c7650 differs from pull request most recent head 99eb0d1. Consider uploading reports for the commit 99eb0d1 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #3907   +/-   ##
==========================================
  Coverage      20.52%   20.52%           
  Complexity         6        6           
==========================================
  Files           1945     1945           
  Lines          41660    41660           
  Branches        3946     3946           
==========================================
  Hits            8551     8551           
  Misses         32712    32712           
  Partials         397      397           

@Coduz Coduz merged commit 9563e03 into eclipse-kapua:develop Nov 17, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it! Documentation Doc... What?? Joke! We will write some!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants