Read Only ========= The OpenAPI :samp:`readOnly` directive is interpreted by OpenAlchemy that the column may not be present for construction (which means that it is either :samp:`null` or generated by the server). .. seealso:: :ref:`read-only` OpenAlchemy documentation for the readOnly value. The following example defines that :samp:`id` cannot be passed to the server for an :samp:`Employee` object: .. literalinclude:: ../../../examples/read_only/example-spec.yml :language: yaml :linenos: The following file uses OpenAlchemy to generate the SQLAlchemy models: .. literalinclude:: ../../../examples/read_only/models.py :language: python :linenos: The SQLAlchemy models generated by OpenAlchemy are equivalent to the following traditional models file: .. literalinclude:: ../../../examples/read_only/models_traditional.py :language: python :linenos: OpenAlchemy will generate the following typed models: .. literalinclude:: ../../../examples/read_only/models_auto.py :language: python :linenos: .. seealso:: :ref:`getting-started`