Skip to content

API-DOC through web UI, POST and PUT use default Xml may fail, have to use Json #603

@alin2k

Description

@alin2k

Description

OSC ipaddr:8090/api-doc manually test API POST e.g. POST /api/server/v1/virtualizationConnectors/{vcId}/serviceFunctionChain got "bad request" by default using default content-type "application/xml" form, has to select "application/json" to make it work.

Expected Behavior

API should accept both format xml/json when do POST or PUT

Actual Behavior

Only accept Json format (default is Xml) to POST or PUT, Xml got error "Bad Request"

Steps to Reproduce

1)https://10.3.240.156:8090/api-doc/ ->Operations for Virtualization Connectors
2)POST /api/server/v1/virtualizationConnectors/{vcId}/serviceFunctionChain and enter white entries value of "vcId" and "body" for name and virtualSystemIds
3)Click "Try It Out!" and response got "bad request"
4)Select from Xml to Jason, POST works and got response 200

Additional Information: log attached:

xmlPostBadReqLog800.txt

Environment

  • OSC Version/Build: v0.8 build#1
  • Cloud Provider Info:
  • Plugin Info:
  • Other:

Status

  • Reproduced
  • In Progress
  • Validated => Verified in Version/Build:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions