diff --git a/pydantic/schema.py b/pydantic/schema.py
--- a/pydantic/schema.py
+++ b/pydantic/schema.py
@@ -72,16 +72,17 @@
     literal_values,
     new_type_supertype,
 )
-from .utils import lenient_issubclass
+from .utils import get_model, lenient_issubclass
 
 if TYPE_CHECKING:
     from .main import BaseModel  # noqa: F401
+    from .dataclasses import DataclassType  # noqa: F401
 
 default_prefix = '#/definitions/'
 
 
 def schema(
-    models: Sequence[Type['BaseModel']],
+    models: Sequence[Union[Type['BaseModel'], Type['DataclassType']]],
     *,
     by_alias: bool = True,
     title: Optional[str] = None,
@@ -104,8 +105,9 @@ def schema(
     :return: dict with the JSON Schema with a ``definitions`` top-level key including the schema definitions for
       the models and sub-models passed in ``models``.
     """
+    clean_models = [get_model(model) for model in models]
     ref_prefix = ref_prefix or default_prefix
-    flat_models = get_flat_models_from_models(models)
+    flat_models = get_flat_models_from_models(clean_models)
     model_name_map = get_model_name_map(flat_models)
     definitions = {}
     output_schema: Dict[str, Any] = {}
@@ -113,7 +115,7 @@ def schema(
         output_schema['title'] = title
     if description:
         output_schema['description'] = description
-    for model in models:
+    for model in clean_models:
         m_schema, m_definitions, m_nested_models = model_process_schema(
             model, by_alias=by_alias, model_name_map=model_name_map, ref_prefix=ref_prefix
         )
@@ -125,7 +127,9 @@ def schema(
     return output_schema
 
 
-def model_schema(model: Type['BaseModel'], by_alias: bool = True, ref_prefix: Optional[str] = None) -> Dict[str, Any]:
+def model_schema(
+    model: Union[Type['BaseModel'], Type['DataclassType']], by_alias: bool = True, ref_prefix: Optional[str] = None
+) -> Dict[str, Any]:
     """
     Generate a JSON Schema for one model. With all the sub-models defined in the ``definitions`` top-level
     JSON key.
@@ -139,6 +143,7 @@ def model_schema(model: Type['BaseModel'], by_alias: bool = True, ref_prefix: Op
       prefix.
     :return: dict with the JSON Schema for the passed ``model``
     """
+    model = get_model(model)
     ref_prefix = ref_prefix or default_prefix
     flat_models = get_flat_models_from_model(model)
     model_name_map = get_model_name_map(flat_models)
diff --git a/pydantic/utils.py b/pydantic/utils.py
--- a/pydantic/utils.py
+++ b/pydantic/utils.py
@@ -24,6 +24,7 @@
 if TYPE_CHECKING:
     from .main import BaseModel  # noqa: F401
     from .typing import AbstractSetIntStr, DictIntStrAny, IntStr, ReprArgs  # noqa: F401
+    from .dataclasses import DataclassType  # noqa: F401
 
 KeyType = TypeVar('KeyType')
 
@@ -114,6 +115,19 @@ def almost_equal_floats(value_1: float, value_2: float, *, delta: float = 1e-8)
     return abs(value_1 - value_2) <= delta
 
 
+def get_model(obj: Union[Type['BaseModel'], Type['DataclassType']]) -> Type['BaseModel']:
+    from .main import BaseModel  # noqa: F811
+
+    try:
+        model_cls = obj.__pydantic_model__  # type: ignore
+    except AttributeError:
+        model_cls = obj
+
+    if not issubclass(model_cls, BaseModel):
+        raise TypeError('Unsupported type, must be either BaseModel or dataclass')
+    return model_cls
+
+
 class PyObjectStr(str):
     """
     String class where repr doesn't include quotes. Useful with Representation when you want to return a string

That's not how the `schema` function is designed to work. Did you find somewhere in the docs that suggested that?

For now the solution is to use `Model.__pydantic_model__.schema()`, if you'd like to modify `schema()` to accept a dataclass, please submit a PR.
> That's not how the schema function is designed to work. Did you find somewhere in the docs that suggested that?

Ah, apologies, I must've misunderstood. I mostly just expected dataclasses to work similarly to things that inherit from `BaseModel` and don't think I read that `schema()` supports them.

I'd like to make a PR but honestly I'm not sure when I will have the time, so feel free to close if you want.
no problem. Would definitely be better if `schema()` worked with dataclasses as it does with models, so I'll leave this open and fix it when I get a chance if no one else does before.
diff --git a/tests/test_schema.py b/tests/test_schema.py
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -13,6 +13,7 @@
 
 from pydantic import BaseModel, Extra, Field, ValidationError, conlist, validator
 from pydantic.color import Color
+from pydantic.dataclasses import dataclass
 from pydantic.networks import AnyUrl, EmailStr, IPvAnyAddress, IPvAnyInterface, IPvAnyNetwork, NameEmail, stricturl
 from pydantic.schema import (
     get_flat_models_from_model,
@@ -1639,3 +1640,27 @@ class MyModel(BaseModel):
         },
         'required': ['entries'],
     }
+
+
+def test_dataclass():
+    @dataclass
+    class Model:
+        a: bool
+
+    assert schema([Model]) == {
+        'definitions': {
+            'Model': {
+                'title': 'Model',
+                'type': 'object',
+                'properties': {'a': {'title': 'A', 'type': 'boolean'}},
+                'required': ['a'],
+            }
+        }
+    }
+
+    assert model_schema(Model) == {
+        'title': 'Model',
+        'type': 'object',
+        'properties': {'a': {'title': 'A', 'type': 'boolean'}},
+        'required': ['a'],
+    }
diff --git a/tests/test_utils.py b/tests/test_utils.py
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -7,9 +7,10 @@
 
 from pydantic import BaseModel
 from pydantic.color import Color
+from pydantic.dataclasses import dataclass
 from pydantic.fields import Undefined
 from pydantic.typing import display_as_type, is_new_type, new_type_supertype
-from pydantic.utils import ValueItems, deep_update, import_string, lenient_issubclass, truncate
+from pydantic.utils import ValueItems, deep_update, get_model, import_string, lenient_issubclass, truncate
 
 try:
     import devtools
@@ -265,3 +266,22 @@ def test_deep_update_is_not_mutating():
 
 def test_undefined_repr():
     assert repr(Undefined) == 'PydanticUndefined'
+
+
+def test_get_model():
+    class A(BaseModel):
+        a: str
+
+    assert get_model(A) == A
+
+    @dataclass
+    class B:
+        a: str
+
+    assert get_model(B) == B.__pydantic_model__
+
+    class C:
+        pass
+
+    with pytest.raises(TypeError):
+        get_model(C)

AttributeError when using dataclass with schema function
# Bug

Please complete:
* OS: macOS
* Python version `import sys; print(sys.version)`: 3.7.4
* Pydantic version `import pydantic; print(pydantic.VERSION)`: 0.32.2, as well as master as of 7901711

Where possible please include a self contained code snippet describing your bug:

```py
from pydantic.dataclasses import dataclass
from pydantic.schema import schema

@dataclass
class Model:
    name: str

schema([Model])
```

This produces an error message like:
```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jamie/.virtualenvs/tempenv-74cd74727d61/lib/python3.7/site-packages/pydantic/schema.py", line 185, in schema
    flat_models = get_flat_models_from_models(models)
  File "/Users/jamie/.virtualenvs/tempenv-74cd74727d61/lib/python3.7/site-packages/pydantic/schema.py", line 437, in get_flat_models_from_models
    flat_models |= get_flat_models_from_model(model)
  File "/Users/jamie/.virtualenvs/tempenv-74cd74727d61/lib/python3.7/site-packages/pydantic/schema.py", line 378, in get_flat_models_from_model
    fields = cast(Sequence[Field], model.__fields__.values())
AttributeError: type object 'Model' has no attribute '__fields__'
```

The same code using `BaseModel` instead of the `@dataclass` works fine.

With the `dataclass`, `Model.__pydantic_model__.schema()` also works.

tests/test_schema.py::test_key tests/test_schema.py::test_by_alias tests/test_schema.py::test_sub_model tests/test_schema.py::test_schema_class tests/test_schema.py::test_schema_repr tests/test_schema.py::test_schema_class_by_alias tests/test_schema.py::test_choices tests/test_schema.py::test_json_schema tests/test_schema.py::test_list_sub_model tests/test_schema.py::test_optional tests/test_schema.py::test_any tests/test_schema.py::test_set tests/test_schema.py::test_const_str tests/test_schema.py::test_const_false tests/test_schema.py::test_tuple[tuple-expected_schema0] tests/test_schema.py::test_tuple[field_type1-expected_schema1] tests/test_schema.py::test_tuple[field_type2-expected_schema2] tests/test_schema.py::test_bool tests/test_schema.py::test_strict_bool tests/test_schema.py::test_dict tests/test_schema.py::test_list tests/test_schema.py::test_list_union_dict[field_type0-expected_schema0] tests/test_schema.py::test_list_union_dict[field_type1-expected_schema1] tests/test_schema.py::test_list_union_dict[field_type2-expected_schema2] tests/test_schema.py::test_list_union_dict[field_type3-expected_schema3] tests/test_schema.py::test_list_union_dict[field_type4-expected_schema4] tests/test_schema.py::test_date_types[datetime-expected_schema0] tests/test_schema.py::test_date_types[date-expected_schema1] tests/test_schema.py::test_date_types[time-expected_schema2] tests/test_schema.py::test_date_types[timedelta-expected_schema3] tests/test_schema.py::test_str_basic_types[field_type0-expected_schema0] tests/test_schema.py::test_str_basic_types[field_type1-expected_schema1] tests/test_schema.py::test_str_basic_types[field_type2-expected_schema2] tests/test_schema.py::test_str_basic_types[field_type3-expected_schema3] tests/test_schema.py::test_str_constrained_types[StrictStr-expected_schema0] tests/test_schema.py::test_str_constrained_types[ConstrainedStr-expected_schema1] tests/test_schema.py::test_str_constrained_types[ConstrainedStrValue-expected_schema2] tests/test_schema.py::test_special_str_types[AnyUrl-expected_schema0] tests/test_schema.py::test_special_str_types[UrlValue-expected_schema1] tests/test_schema.py::test_email_str_types[EmailStr-email] tests/test_schema.py::test_email_str_types[NameEmail-name-email] tests/test_schema.py::test_secret_types[SecretBytes-string] tests/test_schema.py::test_secret_types[SecretStr-string] tests/test_schema.py::test_special_int_types[ConstrainedInt-expected_schema0] tests/test_schema.py::test_special_int_types[ConstrainedIntValue-expected_schema1] tests/test_schema.py::test_special_int_types[ConstrainedIntValue-expected_schema2] tests/test_schema.py::test_special_int_types[ConstrainedIntValue-expected_schema3] tests/test_schema.py::test_special_int_types[PositiveInt-expected_schema4] tests/test_schema.py::test_special_int_types[NegativeInt-expected_schema5] tests/test_schema.py::test_special_float_types[ConstrainedFloat-expected_schema0] tests/test_schema.py::test_special_float_types[ConstrainedFloatValue-expected_schema1] tests/test_schema.py::test_special_float_types[ConstrainedFloatValue-expected_schema2] tests/test_schema.py::test_special_float_types[ConstrainedFloatValue-expected_schema3] tests/test_schema.py::test_special_float_types[PositiveFloat-expected_schema4] tests/test_schema.py::test_special_float_types[NegativeFloat-expected_schema5] tests/test_schema.py::test_special_float_types[ConstrainedDecimal-expected_schema6] tests/test_schema.py::test_special_float_types[ConstrainedDecimalValue-expected_schema7] tests/test_schema.py::test_special_float_types[ConstrainedDecimalValue-expected_schema8] tests/test_schema.py::test_special_float_types[ConstrainedDecimalValue-expected_schema9] tests/test_schema.py::test_uuid_types[UUID-uuid] tests/test_schema.py::test_uuid_types[UUID1-uuid1] tests/test_schema.py::test_uuid_types[UUID3-uuid3] tests/test_schema.py::test_uuid_types[UUID4-uuid4] tests/test_schema.py::test_uuid_types[UUID5-uuid5] tests/test_schema.py::test_path_types[FilePath-file-path] tests/test_schema.py::test_path_types[DirectoryPath-directory-path] tests/test_schema.py::test_path_types[Path-path] tests/test_schema.py::test_json_type tests/test_schema.py::test_ipv4address_type tests/test_schema.py::test_ipv6address_type tests/test_schema.py::test_ipvanyaddress_type tests/test_schema.py::test_ipv4interface_type tests/test_schema.py::test_ipv6interface_type tests/test_schema.py::test_ipvanyinterface_type tests/test_schema.py::test_ipv4network_type tests/test_schema.py::test_ipv6network_type tests/test_schema.py::test_ipvanynetwork_type tests/test_schema.py::test_callable_type[annotation0] tests/test_schema.py::test_callable_type[annotation1] tests/test_schema.py::test_error_non_supported_types tests/test_schema.py::test_flat_models_unique_models tests/test_schema.py::test_flat_models_with_submodels tests/test_schema.py::test_flat_models_with_submodels_from_sequence tests/test_schema.py::test_model_name_maps tests/test_schema.py::test_schema_overrides tests/test_schema.py::test_schema_from_models tests/test_schema.py::test_schema_with_ref_prefix tests/test_schema.py::test_schema_no_definitions tests/test_schema.py::test_list_default tests/test_schema.py::test_dict_default tests/test_schema.py::test_constraints_schema[kwargs0-str-expected_extra0] tests/test_schema.py::test_constraints_schema[kwargs1-ConstrainedStrValue-expected_extra1] tests/test_schema.py::test_constraints_schema[kwargs2-str-expected_extra2] tests/test_schema.py::test_constraints_schema[kwargs3-bytes-expected_extra3] tests/test_schema.py::test_constraints_schema[kwargs4-str-expected_extra4] tests/test_schema.py::test_constraints_schema[kwargs5-int-expected_extra5] tests/test_schema.py::test_constraints_schema[kwargs6-int-expected_extra6] tests/test_schema.py::test_constraints_schema[kwargs7-int-expected_extra7] tests/test_schema.py::test_constraints_schema[kwargs8-int-expected_extra8] tests/test_schema.py::test_constraints_schema[kwargs9-int-expected_extra9] tests/test_schema.py::test_constraints_schema[kwargs10-float-expected_extra10] tests/test_schema.py::test_constraints_schema[kwargs11-float-expected_extra11] tests/test_schema.py::test_constraints_schema[kwargs12-float-expected_extra12] tests/test_schema.py::test_constraints_schema[kwargs13-float-expected_extra13] tests/test_schema.py::test_constraints_schema[kwargs14-float-expected_extra14] tests/test_schema.py::test_constraints_schema[kwargs15-Decimal-expected_extra15] tests/test_schema.py::test_constraints_schema[kwargs16-Decimal-expected_extra16] tests/test_schema.py::test_constraints_schema[kwargs17-Decimal-expected_extra17] tests/test_schema.py::test_constraints_schema[kwargs18-Decimal-expected_extra18] tests/test_schema.py::test_constraints_schema[kwargs19-Decimal-expected_extra19] tests/test_schema.py::test_unenforced_constraints_schema[kwargs0-int] tests/test_schema.py::test_unenforced_constraints_schema[kwargs1-float] tests/test_schema.py::test_unenforced_constraints_schema[kwargs2-Decimal] tests/test_schema.py::test_unenforced_constraints_schema[kwargs3-int] tests/test_schema.py::test_unenforced_constraints_schema[kwargs4-str] tests/test_schema.py::test_unenforced_constraints_schema[kwargs5-bytes] tests/test_schema.py::test_unenforced_constraints_schema[kwargs6-str] tests/test_schema.py::test_unenforced_constraints_schema[kwargs7-bool] tests/test_schema.py::test_unenforced_constraints_schema[kwargs9-type_9] tests/test_schema.py::test_unenforced_constraints_schema[kwargs10-ConstrainedListValue] tests/test_schema.py::test_constraints_schema_validation[kwargs0-str-foo] tests/test_schema.py::test_constraints_schema_validation[kwargs1-str-foo] tests/test_schema.py::test_constraints_schema_validation[kwargs2-bytes-foo] tests/test_schema.py::test_constraints_schema_validation[kwargs3-str-foo] tests/test_schema.py::test_constraints_schema_validation[kwargs4-int-3] tests/test_schema.py::test_constraints_schema_validation[kwargs5-int-3] tests/test_schema.py::test_constraints_schema_validation[kwargs6-int-3] tests/test_schema.py::test_constraints_schema_validation[kwargs7-int-2] tests/test_schema.py::test_constraints_schema_validation[kwargs8-int-3] tests/test_schema.py::test_constraints_schema_validation[kwargs9-int-3] tests/test_schema.py::test_constraints_schema_validation[kwargs10-int-5] tests/test_schema.py::test_constraints_schema_validation[kwargs11-float-3.0] tests/test_schema.py::test_constraints_schema_validation[kwargs12-float-2.1] tests/test_schema.py::test_constraints_schema_validation[kwargs13-float-3.0] tests/test_schema.py::test_constraints_schema_validation[kwargs14-float-4.9] tests/test_schema.py::test_constraints_schema_validation[kwargs15-float-3.0] tests/test_schema.py::test_constraints_schema_validation[kwargs16-float-2.0] tests/test_schema.py::test_constraints_schema_validation[kwargs17-float-3.0] tests/test_schema.py::test_constraints_schema_validation[kwargs18-float-5.0] tests/test_schema.py::test_constraints_schema_validation[kwargs19-float-3] tests/test_schema.py::test_constraints_schema_validation[kwargs20-float-3] tests/test_schema.py::test_constraints_schema_validation[kwargs21-Decimal-value21] tests/test_schema.py::test_constraints_schema_validation[kwargs22-Decimal-value22] tests/test_schema.py::test_constraints_schema_validation[kwargs23-Decimal-value23] tests/test_schema.py::test_constraints_schema_validation[kwargs24-Decimal-value24] tests/test_schema.py::test_constraints_schema_validation[kwargs25-Decimal-value25] tests/test_schema.py::test_constraints_schema_validation[kwargs26-Decimal-value26] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs0-str-foobar] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs1-str-f] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs2-str-bar] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs3-int-2] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs4-int-5] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs5-int-1] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs6-int-6] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs7-float-2.0] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs8-float-5.0] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs9-float-1.9] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs10-float-5.1] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs11-Decimal-value11] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs12-Decimal-value12] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs13-Decimal-value13] tests/test_schema.py::test_constraints_schema_validation_raises[kwargs14-Decimal-value14] tests/test_schema.py::test_schema_kwargs tests/test_schema.py::test_schema_dict_constr tests/test_schema.py::test_bytes_constrained_types[ConstrainedBytes-expected_schema0] tests/test_schema.py::test_bytes_constrained_types[ConstrainedBytesValue-expected_schema1] tests/test_schema.py::test_optional_dict tests/test_schema.py::test_optional_validator tests/test_schema.py::test_field_with_validator tests/test_schema.py::test_known_model_optimization tests/test_schema.py::test_root tests/test_schema.py::test_root_list tests/test_schema.py::test_root_nested_model tests/test_schema.py::test_new_type_schema tests/test_schema.py::test_literal_schema tests/test_schema.py::test_color_type tests/test_schema.py::test_model_with_schema_extra tests/test_schema.py::test_model_with_extra_forbidden tests/test_schema.py::test_enforced_constraints[int-kwargs0-field_schema0] tests/test_schema.py::test_enforced_constraints[annotation1-kwargs1-field_schema1] tests/test_schema.py::test_enforced_constraints[annotation2-kwargs2-field_schema2] tests/test_schema.py::test_enforced_constraints[annotation3-kwargs3-field_schema3] tests/test_schema.py::test_enforced_constraints[annotation4-kwargs4-field_schema4] tests/test_schema.py::test_enforced_constraints[annotation5-kwargs5-field_schema5] tests/test_schema.py::test_enforced_constraints[annotation6-kwargs6-field_schema6] tests/test_schema.py::test_enforced_constraints[annotation7-kwargs7-field_schema7] tests/test_schema.py::test_real_vs_phony_constraints tests/test_schema.py::test_conlist tests/test_schema.py::test_subfield_field_info tests/test_schema.py::test_dataclass tests/test_utils.py::test_import_module tests/test_utils.py::test_import_module_invalid tests/test_utils.py::test_import_no_attr tests/test_utils.py::test_display_as_type[str-str] tests/test_utils.py::test_display_as_type[string-str] tests/test_utils.py::test_display_as_type[value2-Union[str, tests/test_utils.py::test_display_as_type_enum tests/test_utils.py::test_display_as_type_enum_int tests/test_utils.py::test_display_as_type_enum_str tests/test_utils.py::test_lenient_issubclass tests/test_utils.py::test_lenient_issubclass_is_lenient tests/test_utils.py::test_truncate[object-<class tests/test_utils.py::test_truncate[abcdefghijklmnopqrstuvwxyz-'abcdefghijklmnopq\u2026'] tests/test_utils.py::test_truncate[input_value2-[0, tests/test_utils.py::test_value_items tests/test_utils.py::test_value_items_error tests/test_utils.py::test_is_new_type tests/test_utils.py::test_new_type_supertype tests/test_utils.py::test_pretty tests/test_utils.py::test_pretty_color tests/test_utils.py::test_devtools_output tests/test_utils.py::test_devtools_output_validation_error tests/test_utils.py::test_deep_update[mapping0-updating_mapping0-expected_mapping0-extra tests/test_utils.py::test_deep_update[mapping1-updating_mapping1-expected_mapping1-values tests/test_utils.py::test_deep_update[mapping2-updating_mapping2-expected_mapping2-values tests/test_utils.py::test_deep_update[mapping3-updating_mapping3-expected_mapping3-deeply tests/test_utils.py::test_deep_update_is_not_mutating tests/test_utils.py::test_undefined_repr tests/test_utils.py::test_get_model