Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Agnul97
Copy link
Contributor

@Agnul97 Agnul97 commented Apr 17, 2023

here I inserted a new "server" field in the openAPI root specification that allows to automatically populating the URL that will be used in subsequent rest API calls by swagger. This is based by the fact that swagger defaults to the url used to host the definition file, so if this is the case, upon opening swagger automatically the selected "server" field will be the one I inserted which references to the same host where the file is placed.

[possible side effects]
it should be noted that I had to hardcode in the definition of this field only the version (/v1) so if in the future we will have a new one this field will need to be changed. I did not find a way to let Swagger populate all the url EXCEPT FOR the version, customizable with a field.

image

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Merging #3762 (f2c94e2) into develop (71e0639) will not change coverage.
The diff coverage is n/a.

❗ Current head f2c94e2 differs from pull request most recent head c472fc1. Consider uploading reports for the commit c472fc1 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #3762   +/-   ##
==========================================
  Coverage      22.22%   22.22%           
  Complexity         6        6           
==========================================
  Files           1876     1876           
  Lines          35444    35444           
  Branches        2783     2783           
==========================================
  Hits            7879     7879           
  Misses         27253    27253           
  Partials         312      312           

@Agnul97 Agnul97 marked this pull request as draft April 17, 2023 12:21
@Coduz Coduz added Enhancement This PR/Issue improves an part of Kapua Documentation Doc... What?? Joke! We will write some! labels Jul 12, 2023
@Agnul97 Agnul97 force-pushed the feature-automaticPathRestAPI branch from dcea8cc to c472fc1 Compare July 12, 2023 14:54
@Coduz Coduz marked this pull request as ready for review July 31, 2023 13:43
@Coduz Coduz merged commit 055c84b into eclipse-kapua:develop Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Doc... What?? Joke! We will write some! Enhancement This PR/Issue improves an part of Kapua

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants