Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/robofit/arcor2_editor
Browse files Browse the repository at this point in the history
  • Loading branch information
xBambusekD committed Mar 18, 2024
2 parents 1fcd792 + e36c48b commit 259d781
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arcor2_AREditor/Assets/BASE/Scripts/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ private async void OnConnectionStatusChanged(ConnectionStatusEnum newState) {

SystemInfo = systemInfo;
ServerVersion.text = "Editor version: " + Application.version +
"\nServer version: " + systemInfo.Version;
"\nServer version: " + systemInfo._Version;
ConnectionInfo.text = WebsocketManager.Instance.APIDomainWS;
MainMenu.Instance.gameObject.SetActive(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public async override void SaveLogs(IO.Swagger.Model.Scene scene, IO.Swagger.Mod
StreamWriter logsFile = File.CreateText(dirname + "/logs.txt");
logsFile.WriteLine("Editor version: " + Application.version);
if (GameManager.Instance.SystemInfo != null) {
logsFile.WriteLine("Server version: " + GameManager.Instance.SystemInfo.Version);
logsFile.WriteLine("Server version: " + GameManager.Instance.SystemInfo._Version);
}

logsFile.WriteLine("Editor API version: " + GameManager.ApiVersion);
Expand Down
Binary file modified arcor2_AREditor/Assets/BASE/Scripts/Swagger/IO.Swagger.dll
Binary file not shown.
8 changes: 6 additions & 2 deletions scripts/build_models.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ tmpconf=$(mktemp ./conf.XXXXXX)
tmpoutput=$(mktemp -d ./output.XXXXXX)


echo '{\n"optionalEmitDefaultValues": true,\n"packageName": "IO.Swagger"\n}' > "$tmpconf"
echo '{"optionalEmitDefaultValues": true,"packageName": "IO.Swagger"}' > "$tmpconf"

sed 's/ - properties: {}/ - properties:\n data:\n default: ""\n type: string/g' "$1" | perl -0777 -pe's/format: uuid\n/\n/g' | perl -0777 -pe's/properties:\n allowed_values:\n type: array\n uniqueItems: true/properties:\n allowed_values:\n type: array\n uniqueItems: true\n items:\n {}/g' > "$tmpfile"


sudo docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/"$tmpfile" -g csharp -o /local/"$tmpoutput" -c /local/"$tmpconf" || exit 1
sudo docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v6.6.0 generate -i /local/"$tmpfile" -g csharp -o /local/"$tmpoutput" -c /local/"$tmpconf" || exit 1
rm "$tmpconf"
sudo chown -R `whoami` "$tmpoutput"

Expand All @@ -48,7 +48,11 @@ sed -i'' 's/DataMember(Name="cylinder", EmitDefaultValue=true)/DataMember(Name="
sed -i'' 's/DataMember(Name="mesh", EmitDefaultValue=true)/DataMember(Name="mesh", EmitDefaultValue=false)/' ./"$tmpoutput"/src/IO.Swagger/Model/ObjectModel.cs
sed -i'' 's/DataMember(Name="sphere", EmitDefaultValue=true)/DataMember(Name="sphere", EmitDefaultValue=false)/' ./"$tmpoutput"/src/IO.Swagger/Model/ObjectModel.cs
sed -i'' 's/DataMember(Name="type", EmitDefaultValue=true)/DataMember(Name="type", EmitDefaultValue=false)/' ./"$tmpoutput"/src/IO.Swagger/Model/ObjectModel.cs
sed -i'' 's/DataMember(Name="arm_id", EmitDefaultValue=true)/DataMember(Name="arm_id", EmitDefaultValue=false)/' ./"$tmpoutput"/src/IO.Swagger/Model/InverseKinematicsRequestArgs.cs
sed -i'' 's/DataMember(Name="data", EmitDefaultValue=true)/DataMember(Name="data", EmitDefaultValue=false)/' ./"$tmpoutput"/src/IO.Swagger/Model/InverseKinematicsRequest.cs
sed -i'' 's/DataMember(Name="object_model", EmitDefaultValue=true)/DataMember(Name="object_model", EmitDefaultValue=false)/' ./"$tmpoutput"/src/IO.Swagger/Model/ObjectTypeMeta.cs
sed -i'' 's/DataMember(Name="arm_id", EmitDefaultValue=true)/DataMember(Name="arm_id", EmitDefaultValue=false)/' ./"$tmpoutput"/src/IO.Swagger/Model/GetEndEffectorsRequestArgs.cs
sed -i'' 's/DataMember(Name="data", EmitDefaultValue=true)/DataMember(Name="data", EmitDefaultValue=false)/' ./"$tmpoutput"/src/IO.Swagger/Model/GetEndEffectorsRequest.cs

#find ./"$tmpoutput"/src/IO.Swagger/Model -type f -exec sed -i.bak "s/regexUuid.Match(this.Uuid/regexUuid.Match(this.Uuid.ToString()/g" {} \;

Expand Down

0 comments on commit 259d781

Please sign in to comment.