Interesting! If I rename guildServices.swagger.json
to guild.json
, it works (including generating the Models CS file).
–
TEST 1
(my first attempt)
As for why I ended up with guildServices.swagger.json
as the name, it was something I picked up in example code or docs and stuck with. I don’t remember where and can’t find it.
- Rename the swagger file to
gateway/guildServices.swagger.json
- Copy this swagger file to the Spec folders
- In Dockerfile:
ARG SWAGGER_JSON=guildService.swagger.json
- Delete any previous
com.AccelByte.SDK.custom
output folder
If you then run the make all command, you should get this error:
* copied ./res/com.AccelByte.SDK.Custom into com.AccelByte.SDK.Custom
* copied GuildSpec/Client into com.AccelByte.SDK.Custom/spec/Client
* copied GuildSpec/GameServer into com.AccelByte.SDK.Custom/spec/GameServer
* copied GuildSpec/Models into com.AccelByte.SDK.Custom/spec/Models
* generated package.json
* generated package-lock.json
* generated version.json
cat: client_services.json: No such file or directory
cat: gameserver_services.json: No such file or directory
Traceback (most recent call last):
File "accelbyte-codegen.py", line 115, in <module>
File "accelbyte_codegen\cli\__main__.py", line 42, in main
File "click\core.py", line 1157, in __call__
File "click\core.py", line 1078, in main
File "click\core.py", line 1688, in invoke
File "click\core.py", line 1434, in invoke
File "click\core.py", line 783, in invoke
File "click\decorators.py", line 33, in new_func
File "accelbyte_codegen\cli\render\command.py", line 325, in renderc_command
File "accelbyte_codegen\cli\render\command.py", line 106, in render
File "accelbyte_codegen\cli\render\processor.py", line 209, in __call__
File "accelbyte_codegen\cli\render\processor.py", line 203, in __call__
File "accelbyte_codegen\cli\render\processor.py", line 130, in __call__
File "accelbyte_codegen\cli\render\processor.py", line 115, in __call__
AssertionError: 'C:\dev\Upshot\RPM-SuperMega\ExtendTest\extend-se-csharp\codegen\accelbyte-unity-sdk-template-pack\client_services.json' path does not exist
[7404] Failed to execute script 'accelbyte-codegen' due to unhandled exception!
make[1]: *** [Makefile:171: generate_settings] Error 1
make: *** [Makefile:195: generate_service_all] Error 255
This is why I thought that those files might need these specific names.
–
TEST 2
(what I had when I posted)
I used the previous errors as clues to the Spec filenames, and did the same steps as TEST 1 except:
- Rename
Spec/Client/guildService.swagger.json
to Spec/Client/client_services.json
- Rename
Spec/GameServer/guildService.swagger.json
to Spec/Client/gameserver_services.json
If you run the make all command again, it completes without error messages but the com.AccelByte.SDK.Custom/Runtime/Models
folder is missing so the API has type errors:
com.AccelByte.SDK.Custom
├───Editor
│
└───Runtime
├───Api
│ ClientServices.cs
│ ClientServicesApi.cs
│
├───Core
│ AccelByteCustomPlugin.cs
│ AccelByteServerCustomPlugin.cs
│ CustomClientConfig.cs
│ ServerCustomClientConfig.cs
│
└───Server
ServerGameserverServices.cs
ServerGameserverServicesApi.cs
and in Unity:
Packages\com.AccelByte.SDK.Custom\Runtime\Server\ServerGameserverServices.cs(41,28): error CS0246: The type or namespace name 'AccelByteGameserverServicesGuildCreateOrUpdateGuildProgressResponse' could not be found (are you missing a using directive or an assembly reference?)
–
TEST 3
(based on your reply)
- Rename all
Spec/*.json
swagger files to Spec/Client/guild.json
- In Dockerfile:
ARG SWAGGER_JSON=guild.json
- Delete any previous
com.AccelByte.SDK.Custom
output folder
This time, no error messages and the Models/
code file is there!
com.AccelByte.SDK.Custom
├───Editor
│
└───Runtime
│
├───Api
│ Guild.cs
│ GuildApi.cs
│
├───Core
│ AccelByteCustomPlugin.cs
│ AccelByteServerCustomPlugin.cs
│ CustomClientConfig.cs
│ ServerCustomClientConfig.cs
│
├───Models
│ AccelByteGuildModels.cs
│
└───Server
ServerGuild.cs
ServerGuildApi.cs
My guess is perhaps something to do with file length, but more likely having two periods in the filename.
Hope this helps!
Chris