redhat-developer / app-services-api-guidelines

Design guidelines for App Services APIs
https://api.appservices.tech
Apache License 2.0
4 stars 3 forks source link

Pascal regex with ending digit error #120

Open r00ta opened 1 year ago

r00ta commented 1 year ago

This regex for PascalCase is not allowing trailing numbers (see this error) is there a specific reason for that or is it possible to change the regex to allow this pattern?

Thanks

manstis commented 1 year ago

This issue seems to be opening a wider reaching concern of API versions.

If we rename the type to something like BridgeResponseV2DTO we are still hit with the Pascal Case violation.

We'd (hopefully) all agree BridgeResponseVTwoDTO is not a good name.

The problem is we're generating a single OpenAPI definition for both API versions and as such we cannot re-use the simple form BridgeResponse as the types are defined at the root (components\schemas) level of the OpenAPI file and not "per path" (paths\<path>\verb where <path> contains the version information).

What is the proposal for different API versions? Multiple OpenAPI definition files? Does AppServices support that?

r00ta commented 1 year ago

This issue seems to be opening a wider reaching concern of API versions.

If we rename the type to something like BridgeResponseV2DTO we are still hit with the Pascal Case violation.

We'd (hopefully) all agree BridgeResponseVTwoDTO is not a good name.

The problem is we're generating a single OpenAPI definition for both API versions and as such we cannot re-use the simple form BridgeResponse as the types are defined at the root (components\schemas) level of the OpenAPI file and not "per path" (paths\<path>\verb where <path> contains the version information).

What is the proposal for different API versions? Multiple OpenAPI definition files? Does AppServices support that?

As per internal chat we proposed that the service could have one independent openapi file for each version of the backend api, and the sdk team could generate a brand new sdk for each openapi file. Let's say a smart events v1 and smart events v2 artifacts in this list - ready to be downloaded and used Screenshot from 2022-11-14 09-45-06

cc @dimakis