Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX description field (required) may be null #656

Merged
merged 2 commits into from
Dec 13, 2017

Conversation

soranoba
Copy link
Contributor

@soranoba soranoba commented Dec 9, 2017

Now, description fields are often null, but it is required.
I fixed it become the correct format by changing to empty character from null.

        "responses": {
          "201": {
-            "description": null,
+            "description": "",
            "schema": {
              "$ref": "#/definitions/HogeEntity"
            }
          }
        },
"definitions": {
    "HogeEntity": {
      "type": "object",
      "properties": {
         "id": {
          "type": "integer",
          "format": "int32",
          "description": ""
        }
     },
     "required": [
        "id"
      ],
-      "description": null
+      "description": ""
    }

This is caused by omitted of detail or message.
However, these are I/F assuming that they can be omitted.

# detail omitted
post failure: [
    {code: 201, model: Entities::HogeEntity} # message omitted
] do
  status 201
end

@grape-bot
Copy link

grape-bot commented Dec 9, 2017

1 Warning
⚠️ There’re library changes, but not tests. That’s OK as long as you’re refactoring existing code.

Generated by 🚫 danger

@coveralls
Copy link

coveralls commented Dec 9, 2017

Coverage Status

Coverage decreased (-0.1%) to 97.798% when pulling d9537e9 on soranoba:fix/description_may_be_null into 1d14091 on ruby-grape:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.7%) to 99.645% when pulling c35f03d on soranoba:fix/description_may_be_null into 1d14091 on ruby-grape:master.

@coveralls
Copy link

coveralls commented Dec 9, 2017

Coverage Status

Coverage decreased (-0.1%) to 97.798% when pulling c35f03d on soranoba:fix/description_may_be_null into 1d14091 on ruby-grape:master.

@LeFnord
Copy link
Member

LeFnord commented Dec 11, 2017

please proveide a spec to document the fix … thanks

@soranoba
Copy link
Contributor Author

@LeFnord

The description of this PR changed.
Please let me know if there is still a shortage.

@LeFnord
Copy link
Member

LeFnord commented Dec 13, 2017

thanks @soranoba … now it is clear 😄

@LeFnord LeFnord merged commit ea98aa8 into ruby-grape:master Dec 13, 2017
@soranoba soranoba deleted the fix/description_may_be_null branch December 13, 2017 08:47
LeFnord pushed a commit to LeFnord/grape-swagger that referenced this pull request Feb 9, 2019
* FIX description field (required) may be null

* update CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants