Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freemarker template #5

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Freemarker template #5

wants to merge 21 commits into from

Conversation

jajecnikmarci
Copy link
Collaborator

What I Did

Implemented the generation of changes into an XSD file based on defined changes

How To Test It

Should be tested with file cooperation tools to the liquibase repository dbchangelog-latest.xsd file

Cannot resolve symbol 'xsd:databasefunction'
Cannot resolve symbol 'xsd:sequencenextvaluefunction'
Cannot resolve symbol 'xsd:list'

and documentations that contain tags produce errors
@jajecnikmarci jajecnikmarci removed the request for review from b-gyula November 10, 2024 21:07
@b-gyula
Copy link
Owner

b-gyula commented Nov 14, 2024

The XSD structure is still in valid:

  1. <annotation> tag has to be child element of the relevant <attribute>. See issue description.
  2. The <documentation> tag for <attribute> supposed to contain the description of the property, not the change's. See issue description.

Add the referenced data types definitions to the end of the flt template to be able to easier test the result.

    <xsd:simpleType name="propertyExpression" id="propertyExpression">
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="\$\{[\w\.\-\+_]+\}"/>
        </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="booleanExp" id="booleanExp">
        <xsd:annotation>
            <xsd:documentation>Extension to standard XSD boolean type to allow ${r"${}"} parameters</xsd:documentation>
        </xsd:annotation>
        <xsd:union>
            <xsd:simpleType>
                <xsd:restriction base="xsd:boolean"/>
            </xsd:simpleType>
            <xsd:simpleType>
                <xsd:restriction base="propertyExpression"/>
            </xsd:simpleType>
        </xsd:union>
    </xsd:simpleType>

    <xsd:simpleType name="integerExp" id="integerExp">
        <xsd:annotation>
            <xsd:documentation>Extension to standard XSD integer type to allow ${r"${}"} parameter placeholders</xsd:documentation>
        </xsd:annotation>
        <xsd:union>
            <xsd:simpleType>
                <xsd:restriction base="xsd:int">
                    <xsd:minInclusive value="0"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType>
                <xsd:restriction base="propertyExpression"/>
            </xsd:simpleType>
        </xsd:union>
    </xsd:simpleType>
    <xsd:simpleType name="nonEmptyString">
        <xsd:annotation>
            <xsd:documentation>String containing at least 1 non whitespace character</xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="[\S\t].*"/>
        </xsd:restriction>
    </xsd:simpleType>

@b-gyula b-gyula marked this pull request as draft November 14, 2024 11:40
@jajecnikmarci jajecnikmarci marked this pull request as ready for review November 14, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a modified version of the doc generator that uses freemarker template
2 participants