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
2.18.4 / 2.19.0 - Swagger generated Python api requires all fields for POST /endpoints #10198
Comments
This issue persists with the 2.19.0 update |
I've had some feedback from our engineering team, and they've pointed out that you're using
If you try with a 2.x version (for example
|
I am getting the same error with the swagger codegen 2.4.41. Arguments marked optional in the documentation are mandatory in the python generated code |
It appears there may be a bug with API key authentication in 2.20 that our team are now looking into, so this could be part of the issue. I've been working with our engineering team and they've provided the following code snippet that should work using JWT authentication instead of API key auth as a workaround (it'll do the JWT generation itself, it just needs your credentials instead of a key) - are you able to give this a test and see if it works as you'd expect?
|
My appologies, I seem to have made a mistake when running the swagger generation with |
Great, thanks for following up. I'll close this issue (and the other one). |
Before you start please confirm the following.
Problem Description
When using the Python API generated from the Swagger spec, the
EndpointsApi.endpoint_create
which maps toPOST /endpoints
api call requires that all parameters are set, even though the Swagger Docs mention that only Name, EndpointCreationType, and EdgeTunnelServerAddress is required. Which by the way, is the EdgeTunnelServerAddress field being required as intended?Expected Behavior
The api call succeeds
Actual Behavior
An exception is thrown
Steps to Reproduce
PORTAINER_URL
andAPI_KEY
valuesCommand used to create the Python API
Sample Code:
Portainer logs or screenshots
Portainer version
2.18.4
Portainer Edition
Community Edition (CE)
Platform and Version
Docker 24.0.4, docker-compose 2.7.0
OS and Architecture
Ubuntu 20.04, AMD64
Browser
No response
What command did you use to deploy Portainer?
docker-compose up with the following docker-compose.yml version: "3" services: portainer: image: portainer/portainer-ce:2.18.4 container_name: portainer ports: - 8000:8000 - 9443:9443 volumes: - /var/run/docker.sock:/var/run/docker.sock - portainer_data:/data network_mode: host portainer-agent: image: portainer/agent:2.18.4 container_name: portainer_agent ports: - 9001:9001 volumes: - /var/run/docker.sock:/var/run/docker.sock - portainer_data:/data network_mode: host volumes: portainer_data:
Additional Information
No response
The text was updated successfully, but these errors were encountered: