Releases: eclipse-furo/eclipsefuro
muSpec2Spec with new options
With the muSpec.forceLabels: true
option the label and placeholder field in the specs are updated every time you run muSpec2Spec
.
The labels can also have a prefix now. To set the prefix use the config option labelPrefix: "prefix."
.
muSpec:
types:
- "./muspecs/**/*types.yaml"
- "./muspecs/*types.yaml"
services:
- "./muspecs/**/*services.yaml"
- "./muspecs/*services.yaml"
dir: "muspecs"
forceSync: true # This will delete specs which are deleted in muSpec, this is very useful during prototyping
forceLabels: true # This will overwrite the label and placeholder texts during muSpec2Spec command
requestTypeSuffix: "Request" # Suffix for the generated request types
labelPrefix: "prefix." # This is the prefix
commands: #camelCase is not allowed, command scripts can only be executed from a flow
v1.36.1 fix enum in esModule
furo genEsModule
will set the type on fields which uses enum types to enum.
What's Changed
- BEC 1.36.0 by @veith in #24
- fix: genEsModule sets type enum on fields which uses a enum type by @veith in #27
Full Changelog: v1.36.0...v1.36.1
extended enum support
In this release we have extended the enum support for furo extensively.
features
protoc-gen-furo-muspecs
can import enums- muSpecs with enum support
furo muSpec2Spec
with enum transformationfuro spec2muSpec
with enum transformationfuro genMessageProto
with enum transformationfuro genEsModule
with enum transformation
Since js does not have a enum representation built in to the language
furo genEsModule
will produce a optionlist on the usage of the enum type, which can be bound to a select field.
- enum: 'experiment.Enum #Description for a enum sample with aliases'
values:
UNKNOWN: 0
STARTED: 1
RUNNING: 1
COMPLETE: 2
target: enums.proto
alias: true # this is needed when you want to allow aliases
The produced optionlist will look like this:
{
"enum": {
"type": "experiment.Enum",
"meta": {
"default": "",
"placeholder": "experiment.experiment.enum.placeholder",
"hint": "",
"label": "experiment.experiment.enum.label",
"options": {
"flags": ["enum"],
"list": [{
"@type": "type.googleapis.com/furo.Optionitem",
"display_name": "enum.experiment.enum.unknown.label",
"id": 0,
"selected": false
}, {
"@type": "type.googleapis.com/furo.Optionitem",
"display_name": "enum.experiment.enum.started.label",
"id": 1,
"selected": false
}, {
"@type": "type.googleapis.com/furo.Optionitem",
"display_name": "enum.experiment.enum.running.label",
"id": 1,
"selected": false
}, {
"@type": "type.googleapis.com/furo.Optionitem",
"display_name": "enum.experiment.enum.complete.label",
"id": 2,
"selected": false
}]
},
"readonly": false,
"repeated": false,
"typespecific": null
},
"constraints": {},
"__proto": {
"number": 32
}
}
}
fixes
- fix: muspec2Spec constraint "required" gets overwritten if default was changed
- fix: default constraint message key with proper key
- fix: set correct targetfile in muspec
proto importer for specs and muspecs
Now we offer 2 different ways to import specs from protos.
protoc-gen-furo-muspecs
which will generate muspecsprotoc-gen-furo-specs
which will generate specs
Usage: add this to your buf.gen.yaml
version: v1beta1
plugins:
- name: furo-muspecs
out: dist/muspecs
opt: paths=source_relative
New features
- furo init with baseSpec v1.28.0
- pure grpc support, allows you to define pure grpc api's without bindings
protoc-gen-furo-muspecs
a protoc generator to generate muspecsprotoc-gen-furo-specs
a protoc generator to generate specs- define
*
as body field with same behavior like HttpRule
Fixes
- spec2MuSpec with requestTypeSuffix
- init with
FuroRequest
as default requestTypeSuffix
oneof support in muspec
Oneof groups can now be defined in the µSpecs.
fieldname: '* string:2 = default value [oneofname] #The description.'
!_______! !_!!____!!_!!______________!!__________!!________________!
| | | | | | |
| | | | | oneof definition in [] |
| | | | default value (=) |
| | | | |
| | | | description (recomended) begins with a #
field name | | |
| | field id, indicated by a :
| |
| type
|
Indicator for required (*), readonly (-), repeated ([])
Attention:
The default values are synced correctly now.
If you work with µSpecs and use default values, you have sync back the default values from the spec once. Do this by runningfuro spec2muSpec
.
Configurable request type names
Features
The names of the generated request types on the muSpec2Spec step have now a configurable suffix.
Furo init will set the config value in .furo to Request, as it was before.
forceSync: true # This will delete specs which are deleted in muSpec, this is very useful during prototyping
requestTypeSuffix: "Request" # Suffix for the generated request type specs
muspec section of .furo config
Documentation updated
The documentation for each command is now updated.
muSpec2Spec Deleting of specs which are not in muspec can be used in a flow
Set the forceSync option to activate.
spec2muSpec Deleting of muspecs which are not in spec can be used in a flow
Set the forceSync option to activate.