[REQ] Help with the "frontend part"
Created by: SilviaCarrozzo
I am part of a team in this moment. Normally I work on frontend, but it happened there is no other who can do the Typescript part either than me. I was given the task to build the client and the APIs. I tried with your documentation and bought and read the book 'A Beginner's Guide to Code Generation for REST APIs (OpenAPI Generator).pdf', but unsuccessfully. A colleague of mine did the C++part executing: /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java -jar /home/.../openapitools/openapi-generator-cli/5.0.0-beta2/openapi-generator-cli-5.0.0-beta2.jar generate -i ./petstore.yaml -g cpp-restbed-server -o ./api
and obtained this folders: find api/ api/ api/.gitignore api/.openapi-generator-ignore api/git_push.sh api/api api/api/UserApi.h api/api/PetApi.h api/api/StoreApi.cpp api/api/PetApi.cpp api/api/StoreApi.h api/api/UserApi.cpp api/README.md api/.openapi-generator api/.openapi-generator/FILES api/.openapi-generator/VERSION api/model api/model/Category.cpp api/model/ApiResponse.cpp api/model/Pet.h api/model/ApiResponse.h api/model/Category.h api/model/Order.h api/model/Tag.h api/model/User.h api/model/Tag.cpp api/model/Order.cpp api/model/Pet.cpp api/model/User.cpp
What should I do to continue the task with my part in Typescript? What are the istructions to generate the remaining code to request APIs? I didn't understand from the book. I am working on a Linux machine. Let me know, please.
logs for the C++ part: /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java -jar /home/../.m2/repository/org/openapitools/openapi-generator-cli/5.0.0-beta2/openapi-generator-cli-5.0.0-beta2.jar generate -i ./petstore.yaml -g cpp-restbed-server -o ./api [main] INFO o.o.codegen.DefaultGenerator - Generating with dryRun=false [main] INFO o.o.codegen.DefaultGenerator - OpenAPI Generator: cpp-restbed-server (server) [main] INFO o.o.codegen.DefaultGenerator - Generator 'cpp-restbed-server' is considered stable. [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] INFO o.o.c.languages.AbstractCppCodegen - Environment variable CPP_POST_PROCESS_FILE not defined so the C++ code may not be properly formatted. To define it, try 'export CPP_POST_PROCESS_FILE="/usr/local/bin/clang-format -i"' (Linux/Mac) [main] INFO o.o.c.languages.AbstractCppCodegen - NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to true (--enable-post-process-file for CLI). [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/ApiResponse.h [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/ApiResponse.cpp [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/Category.h [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/Category.cpp [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/Order.h [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/Order.cpp [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/Pet.h [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/Pet.cpp [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/Tag.h [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/Tag.cpp [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/User.h [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/model/User.cpp [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json) [main] WARN o.o.codegen.DefaultCodegen - Multiple MediaTypes found, using only the first one [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml) [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/api/PetApi.cpp [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/api/PetApi.h [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/api/StoreApi.cpp [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/api/StoreApi.h [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/api/UserApi.cpp [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/api/UserApi.h [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/.gitignore [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/git_push.sh [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/README.md [main] INFO o.o.codegen.TemplateManager - Skipped /home/atlas/sources/test/./api/.openapi-generator-ignore (Skipped by supportingFiles options supplied by user.) [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/.openapi-generator/VERSION [main] INFO o.o.codegen.TemplateManager - writing file /home/atlas/sources/test/./api/.openapi-generator/FILES