Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

GET model definition should return the required parameter for all fields. #241

Open
Natim opened this issue Oct 14, 2014 · 6 comments
Open
Labels

Comments

@Natim
Copy link
Member

Natim commented Oct 14, 2014

No description provided.

@leplatrem
Copy link
Contributor

Can you give an example of what you mean here ?

@almet
Copy link
Member

almet commented Oct 14, 2014

Currently when we do a GET on the definition, we cannot tell if the field is required or not.

@Natim
Copy link
Member Author

Natim commented Oct 14, 2014

http GET https://daybed.io/v1/models/todo/definition --auth-type=hawk      --auth='769f36d23f904f1507afc80400553b1271889cabeb975d5193476b00e12f9ab9:

Returns:

{
    "description": "A list of my stuff to do", 
    "fields": [
        {
            "label": "The item", 
            "name": "item", 
            "type": "string"
        }, 
        {
            "choices": [
                "done", 
                "todo"
            ], 
            "label": "is it done or not", 
            "name": "status", 
            "type": "enum"
        }
    ], 
    "title": "todo"
}

Should returns:

{
    "description": "A list of my stuff to do", 
    "fields": [
        {
            "label": "The item", 
            "name": "item", 
            "type": "string",
            "required": true
        }, 
        {
            "choices": [
                "done", 
                "todo"
            ], 
            "label": "is it done or not", 
            "name": "status", 
            "type": "enum",
            "required": true
        }
    ], 
    "title": "todo"
}

@leplatrem
Copy link
Contributor

Then I guess there are not explicitely stored ?

@leplatrem leplatrem added the bug label Nov 8, 2014
@leplatrem
Copy link
Contributor

I don't reproduce this locally :(

@Natim
Copy link
Member Author

Natim commented Nov 10, 2014

But do you remotely?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants