soil-schema / soil

REST api schema and code generator
MIT License
1 stars 0 forks source link

Support Plug-in #85

Open niaeashes opened 1 year ago

niaeashes commented 1 year ago

Require to make soil schema directive structure flexible.

Basic syntax


schema:
    directive schema?
EOL: "\r"? "\n"
directive:
    annotation* directive-keyword name? type? block? EOL
block:
    "{" EOL schema EOL "}"
annotation:
    annotation-keyword annotation?
directive-keyword:
    string
name:
    string
type:
    ":" type-definition
type-definition:
    literal-names | reference-path | list-definition | map-definition
literal-names:
    "String" | "Integer" | "Number" | "Boolean" | "Timestamp" | "URL"
reference-path:
    reference-keyword ["." reference-path]
list-definition:
    "List" GENERIC_OPEN type-definition GENERIC_END
map-definition:
    "Map" GENERIC_OPEN type-definition GENERIC_SEPARATOR type-definition GENERIC_END

``` hi