-
Notifications
You must be signed in to change notification settings - Fork 13
Problem with publishing port #50
Comments
@Khazrak: The only issue that I see (with naked eye) is the key of the map which should be "1337/tcp" instead. However, this is something created by the sample code and not by the client. Do I miss something? |
What it should look like: what it looks like now All the ports should be in String's here |
@Khazrak: They are Strings :-) The JSON object looks like this:
How did u generate the output? Let me create a quick unit test for that. |
unit test added. |
Ok, now got it to work. Needed to add the "/tcp" manually to the key-part of the Map. Would be nice with a builder for it (the PortBinding has a builder, but not for the |
Even if we had a builder for the map itself (which is on my radar), that would still wouldn't solve the problem, as we would need to have a custom logic:
This is something I wouldn't want to have inside the builder. I am wondering though if the client could use some sort of filters to apply modifications on the outgoing JSON before we send it. A filter would be a place were we could host some logic like this. |
I think that the cleanest way to prevent this is by using validation. |
After successfully exposing a port (thanks to the fix for #48 ) I'm now trying to publish that port.
The CreateRequest looks like this (which is wrong):
PortBindings={1337=[PortBinding(HostIp=0.0.0.0, HostPort=1337, additionalProperties={})]}
I attached the simple code example that generated this request:
Simple.txt
The text was updated successfully, but these errors were encountered: