Code Monkey home page Code Monkey logo

Comments (9)

abellotti avatar abellotti commented on June 30, 2024

That is the correct behavior, if you ask for specific attributes you’d just get those. It could be that description is nil thus not returned. If you get the VM with no attributes specified is description returned ?

from manageiq-api.

nmaludy avatar nmaludy commented on June 30, 2024

@abellotti ah yes, you're right description is NULL in the database.

I would expect that this would be returned and just set to null in the JSON object?

Otherwise, when i get the object back and try to access it response["resources"][0]["description"] that field doesn't exist.

from manageiq-api.

abellotti avatar abellotti commented on June 30, 2024

That is not the current behavior, by design. lotsa fields in some of those models. One option is for you to default above attribute access to null if not there.

from manageiq-api.

chrisarcand avatar chrisarcand commented on June 30, 2024

@abellotti Wait what? That's really confusing without context as the API semantics in this response are telling me "I am not returning you the description" instead of a nil value to indicate...well, that the description is nil; what's the reasoning for us wanting to have that designed behavior, then?

from manageiq-api.

abellotti avatar abellotti commented on June 30, 2024

since early days we don't return nil values, that was for minimizing payloads. The confusion here because the client asked for the particular attribute (via attributes=...) and they don't see it. From a semantics perspective, bug is that we should return it because they asked for it correct ?

from manageiq-api.

chrisarcand avatar chrisarcand commented on June 30, 2024

Yes; as discussed in Gitter, let's go ahead and remove all this functionality around omitting attributes if nil and relying on nil'ing and removing encrypted attrs.

from manageiq-api.

jvlcek avatar jvlcek commented on June 30, 2024

I am closing this issue as it was resolved by #253

from manageiq-api.

miq-bot avatar miq-bot commented on June 30, 2024

This issue has been automatically marked as stale because it has not been updated for at least 6 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions!

from manageiq-api.

JPrause avatar JPrause commented on June 30, 2024

@miq-bot close_issue

from manageiq-api.

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.