 # @param attributes [Object] Payload attributes object
 # @param contentType [Object] Payload content type
 generateSchema = (payload, attributes, contentType, callback) ->
-  if !GENERATE_SCHEMA or (not attributes? or payload.schema or contentType.indexOf('json') is -1)
-    return callback null, payload, attributes, contentType
+  unless GENERATE_SCHEMA is true
+    return callback null
+
+  if not attributes? or payload.schema or contentType.indexOf('json') is -1
+    return callback null
 
   boutique.represent
     ast: attributes,

      payload.content.push resolved
      payload.schema = body

    # For waterfall
    callback null, payload, attributes, contentType

#
# Drafter

    resolvedAttributes ?= attributes
    resolvedAttributes ?= actionAttributes

    generateBody payload, resolvedAttributes, contentType, (error) ->
      return callback error if error

      generateSchema payload, resolvedAttributes, contentType, (error) ->
        callback error or null

  # Expand a certain node with the given rules
  #
