Mercurial > hg > orthanc
diff OrthancFramework/Sources/RestApi/RestApi.cpp @ 4424:83371ccdfe80
openapi documentation is now completed
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Dec 2020 19:28:53 +0100 |
parents | a7d72378e1cb |
children | d9473bd5ed43 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/RestApi/RestApi.cpp Tue Dec 29 16:51:28 2020 +0100 +++ b/OrthancFramework/Sources/RestApi/RestApi.cpp Tue Dec 29 19:28:53 2020 +0100 @@ -874,8 +874,8 @@ { call.GetDocumentation() .SetTag("Other") - .SetSummary("List of operations") - .SetDescription("List the available operations under URI: " + call.FlattenUri()) + .SetSummary("List operations") + .SetDescription("List the available operations under URI `" + call.FlattenUri() + "`") .AddAnswerType(MimeType_Json, "List of the available operations"); RestApi& context = call.GetContext(); @@ -886,12 +886,19 @@ if (call.IsDocumentation()) { call.GetDocumentation().SetSample(directory); + + std::set<std::string> c; + call.GetUriComponentsNames(c); + for (std::set<std::string>::const_iterator it = c.begin(); it != c.end(); ++it) + { + call.GetDocumentation().SetUriArgument(*it, RestApiCallDocumentation::Type_String, ""); + } } else { call.GetOutput().AnswerJson(directory); } - } + } }