Updated YAML File to match API rule for readOnly properties
This commit is contained in:
parent
e890985e2d
commit
38ed66a638
File diff suppressed because it is too large
Load Diff
@ -566,6 +566,7 @@ components:
|
||||
evaluation:
|
||||
$ref: '#/components/schemas/EvaluationType'
|
||||
evaluation_message:
|
||||
readOnly: true
|
||||
maxLength: 512
|
||||
type: string
|
||||
nullable: true
|
||||
@ -964,8 +965,9 @@ components:
|
||||
- email
|
||||
- push
|
||||
EvaluationType:
|
||||
type: string
|
||||
readOnly: true
|
||||
nullable: true
|
||||
type: string
|
||||
enum:
|
||||
- undefined
|
||||
- green
|
||||
|
||||
19
misc/Readme_yaml.md
Normal file
19
misc/Readme_yaml.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Bremen Calling Open API spec
|
||||
|
||||
## Infos zur Generierung der CS Wrapper / Mapping Datei aus YAML
|
||||
|
||||
Verwendung von "OpenAPIGenerator" aus dem [Rest API Client Code Generator 2022](https://marketplace.visualstudio.com/items?itemName=ChristianResmaHelle.ApiClientCodeGenerator2022).
|
||||
Die automatisch generierte Datei muss leider noch nachgearbeitet werden:
|
||||
|
||||
1) #pragma warning disable CS8073 (direkt nach der NS declaration).
|
||||
2) #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' (am Schluss vor der schließenden Klammer des NS)
|
||||
3) Für readOnly Properties wird bei einem Enum kein korrekter Code emittiert. Daher muss aktuell folgende Funktion ergänzt werden, damit beim Speichern das "evaluation" Flag nicht mitgesendet wird:
|
||||
|
||||
```C++
|
||||
public bool ShouldSerializeEvaluation()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
Witziger(!)weise funktioniert es für das Property EvaluationMessage korrekt.
|
||||
Loading…
Reference in New Issue
Block a user