Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[javascript] generated method for POST api has no argument for passing in data #12222

Closed
tomchiverton opened this issue Aug 25, 2023 · 1 comment

Comments

@tomchiverton
Copy link

Description

Generated method for POST API has no argument for passing in POST data

Swagger-codegen version

3.0.46

Swagger declaration file content or url

https://digital.nhs.uk/restapi/oas/357490

The usage is document in non-Swagger JSON here : https://digital.nhs.uk/developer/api-catalogue/message-exchange-for-social-care-and-health-api#post-/messageexchange/-mailbox_id-/outbox

Command line used for generation

java -jar swagger-codegen-cli-*.jar generate -i 3* -l javascript -o mesh-client -DuseES6=true -DusePromises=true

Steps to reproduce
wget https://digital.nhs.uk/restapi/oas/357490
java -jar swagger-codegen-cli-*.jar generate -i 3* -l javascript -o mesh-client -DuseES6=true -DusePromises=true

mesh-client/src/api/OutboxApi.js function sendMessageMessageexchangeMailboxIdOutboxPost (etc) sets postBody to null, with no parameter to set it to anything else

sendMessageMessageexchangeMailboxIdOutboxPost(mailboxId, authorization, mexTo, mexWorkflowid, opts) {

Related issues/PRs

None

Suggest a fix/enhancement

As this is a POST method, there needs to be a parameter for the body

@tomchiverton
Copy link
Author

The API I was using did not match it's JSON description, sorry for the spam :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant