Thanks to visit codestin.com
Credit goes to github.com

Skip to content

openapi2jolie does not generate request body and response fields in OpenAPI v3 specification files #295

@TommasoAzz

Description

@TommasoAzz

Describe the bug
If we were to run openapi2jolie on a OpenAPI v3 specification file all API methods would be generated correctly in the interface, with all their request and response types also generated. By the way, no data fields are generated.

To Reproduce
Steps to reproduce the behavior:

  1. Download a JSON OpenAPI file, like the PetStore example. Download is required because of the following issue: openapi2jolie does not work with remote urls instead of files #296 .
  2. Save it as petstore.json
  3. Run openapi2jolie /path/to/petstore.json PetStore /folder/to/generate/source/into http|https
  4. Look at (for example) the RequestResponse method addPet with request parameter addPetRequest.
    Expected behavior
    addPetRequest should have fields like the definition of model Pet at rows 950-1001 of petstore.json, instead it is empty

Screenshots
Just follow the steps.

Desktop (please complete the following information):

  • OS: Windows 10, MacOS 11.1
  • Jolie version 1.10-beta3
  • Java Version 11.0.8 on Windows, OpenJDK 1.8.0_275 on MacOS

Additional context
The problem of generating data fields does not apply to the generation of GET parameters.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions