Coder Social home page Coder Social logo

Comments (3)

macb avatar macb commented on August 17, 2024

Ya, the API is lenient enough that it will attempt to parse the string as an integer. We shouldn't rely on that and instead correctly marshal CreateDropletRequest.Image as an int/string as required.

from godo.

nesv avatar nesv commented on August 17, 2024

Frankly, I think this is more of a "no-no" on the API side. If the API is lenient enough to support numbers as strings, for private images, why not just enforce the type on the API, to always be a string?

from godo.

macb avatar macb commented on August 17, 2024

I agree it would be best to make the API less lenient but I also think it may be a bit too late for that as other clients may not exhibit this same behavior and may correctly pass an int or a string.

Either way it would be best to change the client to correctly follow the documented behavior of:

number (if using an image ID), or String (if using a public image slug)

Then if the behavior changes, we can correct the client as well.

from godo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.