Hi
I use RO SDK
const
RO_VERSION = '9.5.111.1399';
TROHttpApiRodlConverter doesn’t add decription fileds for enums and structed types to the resulting JSON.
These are proposed fixes:
procedure TROHttpApiRodlConverter.WriteDefinition(aSwaggerRoot: TROJSONObject;
aEntity: TRODLComplexEntity);
begin
...
if aEntity is TRODLStruct then begin
lEntity.AddStringProperty(tag_type,tag_object);
//::BEGIN::FIX
if aEntity.Documentation <> '' then
lEntity.AddStringProperty(tag_description, aEntity.Documentation);
//::END::FIX
lprop := lEntity.AddObjectProperty(tag_properties).AsObject;
WriteStructItems(aSwaggerRoot,lprop,TRODLStruct(aEntity));
end
...
end;
procedure TROHttpApiRodlConverter.WriteEnumItems(aParRoot: TROJSONObject;
aEnum: TRODLEnum);
var
i: Integer;
lenumarray: TROJSONArray;
begin
aParRoot.AddStringProperty(tag_type, tag_string);
//::BEGIN::FIX
if aEnum.Documentation <> '' then
aParRoot.AddStringProperty(tag_description, aEnum.Documentation);
//::END::FIX
lenumarray := aParRoot.AddArrayProperty(tag_enum).AsArray;
for i := 0 to aEnum.Count-1 do
lenumarray.AddStringValue(aEnum.Items[i].Name);
end;
regards