Thursday, 05 June 2025
  4 Replies
  83 Visits
  Subscribe
Hello Sergio,

we use your OpenApi generator (version from May 2023) as it was part of sgcWebSockets.

Now we have a new project and identified a problem with an OpenAPI specification:
https://rksv.fiskaly.com/api/v1/_spec.json

It generates code successfully, but there are some parts missing.

For example it generates the following class:


TsgcOpenAPI_CreateSignatureCreationUnitRequest_Class = class(TsgcOpenAPIClass)
private
[sgcAdditionalProperties]
Fmetadata: TsgcOpenAPI_MetadataRequest_Class;
Flegal_entity_id: String;
Flegal_entity_name: string;
public
class function Read(const aValue: string): TsgcOpenAPI_CreateSignatureCreationUnitRequest_Class;
public
property Metadata: TsgcOpenAPI_MetadataRequest_Class read Fmetadata write Fmetadata;
property Legal_entity_id: String read Flegal_entity_id write Flegal_entity_id;
property Legal_entity_name: string read Flegal_entity_name write Flegal_entity_name;
end;


As I understand the spec, the property Legal_entity_id should be a class instead of a string.


...

"VatId": {
"type": "object",
"properties": {
"vat_id": {
"type": "string",
"description": "A value added tax identification number (e.g. \"ATU73948115\") is an identifier used for value added tax purposes.",
"pattern": "^ATU\\d{8}$",
"example": "ATU73948115"
}
},
"required": [
"vat_id"
],
"additionalProperties": false
},
"TaxId": {
"type": "object",
"properties": {
"tax_id": {
"type": "string",
"pattern": "^\\d{2}[ -]?\\d{3}\\/?\\d{4}$",
"description": "The \"Steuernummer\" is a unique identifier (e.g. \"04-999/9048\") provided by the financial authorities.",
"example": "04-999/9048"
}
},
"required": [
"tax_id"
],
"additionalProperties": false
},
"Gln": {
"type": "object",
"properties": {
"gln": {
"type": "string",
"pattern": "^\\d{13}$",
"description": "The Global Location Number (GLN) is a unique identifier provided by Bundesanstalt Statistik Österreich.",
"example": "1234567890123"
}
},
"required": [
"gln"
],
"additionalProperties": false
},
"LegalEntityId": {
"description": "A unique identifier of the legal entity that operates the Signature Creation Unit.",
"oneOf": [
{
"$ref": "#/components/schemas/VatId"
},
{
"$ref": "#/components/schemas/TaxId"
},
{
"$ref": "#/components/schemas/Gln"
}
]
},
"LegalEntityName": {
"type": "string",
"description": "The name of the legal entity that is bound to the Signature Creation Unit."
},
"CreateSignatureCreationUnitRequest": {
"type": "object",
"properties": {
"metadata": {
"$ref": "#/components/schemas/MetadataRequest"
},
"legal_entity_id": {
"$ref": "#/components/schemas/LegalEntityId"
},
"legal_entity_name": {
"$ref": "#/components/schemas/LegalEntityName"
}
},
"required": [
"legal_entity_id"
],
"additionalProperties": false
},

...


I've tried your latest trial of the OpenApi generator, but it still can't handle the mentioned spec.

If you can fix this, we are willing to buy it.

Best regards,
Waldemar Derr
1 week ago
·
#2309
Hi,

OK, I'll check the specification to implement this feature. I'll let you know when it's ready.

Kind Regards,
Sergio
6 days ago
·
#2310
Hello,

I've published a new sgcOpenAPI beta with support for OneOf. The trial has been updated too.
Thanks for your feedback.

Kind Regards,
Sergio
5 days ago
·
#2311
Hi Sergio,

thank you very much for your fast response!

We will evaluate your changes...

Best regards,
Waldemar Derr
5 days ago
·
#2312
Hi Sergio,

the review was successful. The order has been sent.

Best regards,
Waldemar Derr
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf,pas,dfm,dpr,dproj,dpk
· Insert · Remove
  Upload Files (Maximum 10MB)