dzdrazil / swagger-mock-api

A connect-compatible middleware for mocking a Swagger spec API
MIT License
102 stars 20 forks source link

Is that a way to return fixed value? #5

Closed zzswang closed 9 years ago

zzswang commented 9 years ago

I'm not familiar with chance, haven't figure out a way to do it.

for example, I want this url field to be a fixed value.

Thanks.

        "Image": {
            "properties": {
                "id": {
                    "type": "string"
                },
                "snapshot_url": {
                    "type": "string"
                },
                "source": {
                    "type": "string"
                },
                "url": {
                    "type": "string",
           >>>>"fixed-value": "http://chancejs.com/logo.png"
                }
            }
        }
dzdrazil commented 9 years ago

Not yet, but it's a fairly easy thing to add. Perhaps I can get it in tomorrow.

dzdrazil commented 9 years ago

Fixed with commit 24ae295910d9c9607dde8876f990a63021a5d3a6