mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Add 'tag' field to ApiProcessMetaData; use that when generating spec (for non-table processes for now)
This commit is contained in:
@ -738,11 +738,20 @@ public class GenerateOpenApiSpecAction extends AbstractQActionFunction<GenerateO
|
|||||||
ApiProcessMetaData apiProcessMetaData = pair.getA();
|
ApiProcessMetaData apiProcessMetaData = pair.getA();
|
||||||
QProcessMetaData processMetaData = pair.getB();
|
QProcessMetaData processMetaData = pair.getB();
|
||||||
|
|
||||||
String tag = processMetaData.getLabel();
|
String tag;
|
||||||
|
if(StringUtils.hasContent(apiProcessMetaData.getTag()))
|
||||||
|
{
|
||||||
|
tag = apiProcessMetaData.getTag();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tag = processMetaData.getLabel();
|
||||||
if(doesProcessLabelNeedTheWordProcessAppended(tag))
|
if(doesProcessLabelNeedTheWordProcessAppended(tag))
|
||||||
{
|
{
|
||||||
tag += " process";
|
tag += " process";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tagList.add(new Tag()
|
tagList.add(new Tag()
|
||||||
.withName(tag)
|
.withName(tag)
|
||||||
.withDescription(tag));
|
.withDescription(tag));
|
||||||
|
@ -58,6 +58,7 @@ public class ApiProcessMetaData
|
|||||||
private HttpMethod method;
|
private HttpMethod method;
|
||||||
private String summary;
|
private String summary;
|
||||||
private String description;
|
private String description;
|
||||||
|
private String tag;
|
||||||
|
|
||||||
private AsyncMode asyncMode = AsyncMode.OPTIONAL;
|
private AsyncMode asyncMode = AsyncMode.OPTIONAL;
|
||||||
|
|
||||||
@ -609,4 +610,35 @@ public class ApiProcessMetaData
|
|||||||
return (this);
|
return (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for tag
|
||||||
|
*******************************************************************************/
|
||||||
|
public String getTag()
|
||||||
|
{
|
||||||
|
return (this.tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Setter for tag
|
||||||
|
*******************************************************************************/
|
||||||
|
public void setTag(String tag)
|
||||||
|
{
|
||||||
|
this.tag = tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Fluent setter for tag
|
||||||
|
*******************************************************************************/
|
||||||
|
public ApiProcessMetaData withTag(String tag)
|
||||||
|
{
|
||||||
|
this.tag = tag;
|
||||||
|
return (this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user