public function supports($input)
    {
        /**
         * @var array $swagger
         */
        $swagger = $this->decodeJson($input, true);

        if (empty($swagger)) {
            return false;
        }

        $mandatoryFields = ['swagger', 'info', 'paths', 'version', 'title', 'definitions'];
        $fields = array_merge(array_keys($swagger), array_keys($swagger['info']));
        $intersect = array_intersect($mandatoryFields, $fields);

        // every mandatory field was found in provided json definition.
        return empty(array_diff($mandatoryFields, $intersect));
    }