Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tefra committed Jan 8, 2020
1 parent 4690795 commit cf09316
Show file tree
Hide file tree
Showing 14 changed files with 290 additions and 163 deletions.
10 changes: 10 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
20.1.1 (2020-01-09)
------------------

- Change print mode to print rendered output
- Added new format PlantUML class diagram to replace the old print/debug mode

20.1 (2020-01-07)
------------------

- Initial release
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Features
- JSON Parser & Serializer with type casting
- Serializer/Parser for xml and json

- Format: PlantUML class diagram

-------

.. image:: https://github.com/tefra/xsdata/raw/master/docs/_static/demo.gif

Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Changelog
=========

.. include:: ../CHANGES.rst
45 changes: 5 additions & 40 deletions docs/codegen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,46 +34,7 @@ Renderer
The renderer option changes the output format.

* ``pydata``: Python lib `dataclasses <https://docs.python.org/3/library/dataclasses.html>`_


Print
-----

The print flag bypasses the file writer and instead prints a quick preview of what the generator would create otherwise.

It's a very useful option when the class building process changes with new features.

.. admonition:: Example Output
:class: hint

.. code-block:: python
samples.sabre.output.bargain_finder_max_common_types_v1_9_7.AdvResTicketingType()
adv_res_ind: Optional[bool] = [('default', None)]
adv_reservation: Optional["AdvResTicketingType.AdvReservation"] = [('default', None)]
adv_ticketing: Optional["AdvResTicketingType.AdvTicketing"] = [('default', None)]
adv_ticketing_ind: Optional[bool] = [('default', None)]
samples.sabre.output.bargain_finder_max_common_types_v1_9_7.AdvResTicketingType.AdvReservation()
latest_period: Optional[str] = [('default', None), ('pattern', '[0-9]{1,3}')]
latest_time_of_day: Optional[str] = [('default', None)]
latest_unit: Optional[StayUnitType] = [('default', None)]
samples.sabre.output.bargain_finder_max_common_types_v1_9_7.AdvResTicketingType.AdvTicketing()
from_depart_period: Optional[str] = [('default', None), ('pattern', '[0-9]{1,3}')]
from_depart_time_of_day: Optional[str] = [('default', None)]
from_depart_unit: Optional[StayUnitType] = [('default', None)]
from_res_period: Optional[str] = [('default', None), ('pattern', '[0-9]{1,3}')]
from_res_time_of_day: Optional[str] = [('default', None)]
from_res_unit: Optional[StayUnitType] = [('default', None)]
samples.sabre.output.bargain_finder_max_common_types_v1_9_7.AirTripType(str)
CIRCLE: xs:string = [('default', '"Circle"')]
ONE_WAY: xs:string = [('default', '"OneWay"')]
OPEN_JAW: xs:string = [('default', '"OpenJaw"')]
OTHER: xs:string = [('default', '"Other"')]
RETURN_VALUE: xs:string = [('default', '"Return"')]
* ``plantuml``: `PlantUML <https://plantuml.com/class-diagram>`_ class diagram

Verbosity
---------
Expand All @@ -82,6 +43,10 @@ The verbosity option changes what messages will be printed.

Available options: ``CRITICAL``, ``ERROR``, ``WARNING``, ``INFO`` or ``DEBUG``

Print
-----

The print flag overwrites the verbosity level to `Error` and print to stdOut the output result without writing to the target file.

Examples
--------
Expand Down
37 changes: 37 additions & 0 deletions docs/examples/primer.pu
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@startuml

class Items {
+item : item[]
}
Items +-- item
class item {
+productName : xsd:string
+quantity : xsd:positiveInteger
+USPrice : xsd:decimal
+comment : comment
+shipDate : xsd:date
+partNum : xsd:string
}
class PurchaseOrderType {
+shipTo : USAddress
+billTo : USAddress
+comment : comment
+items : Items
+orderDate : xsd:date
}
class USAddress {
+name : xsd:string
+street : xsd:string
+city : xsd:string
+state : xsd:string
+zip : xsd:decimal
+country : xsd:NMTOKEN
}
class comment {
+value : xsd:string
}
class purchaseOrder {
}
purchaseOrder *- PurchaseOrderType

@enduml
57 changes: 57 additions & 0 deletions docs/examples/primer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit cf09316

Please sign in to comment.