Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pipeline schemas #340

Closed

Conversation

VinyarionHyarmendacil
Copy link
Contributor

Intended for automatic generation of source code for types and validation

Intended for automatic generation of source code for types and validation
@ariesclark
Copy link
Member

@Foorack Didn't un-referenced schemas cause issues with generators? Can we confirm this somehow?

@Foorack
Copy link
Member

Foorack commented Jun 4, 2024

I don't remember if unreferenced objects cause problems. Unless they are referenced somewhere then the spec bundler will probably ignore them. Also documenting the Notifications API is messy, because they send objects as JSON-encoded strings, which OpenAPI has now way of specifying.

  1. You need to parse the overall JSON notification object.
  2. You need to get the "data" string
  3. You need to again parse that as a JSON object.

For this reason it was documented as Markdown and left as that.


@VinyarionHyarmendacil Has this been tested? My main concern is that the spec bundler will ignore unreferenced objects. As long as they are included in the final spec output then the code generator should generate them fine...

@VinyarionHyarmendacil
Copy link
Contributor Author

I haven't figured out how to get the automatic generation to work for me, so it hasn't been tested yet.
In the same spirit as the specification-test repo I have instrumented one of the SDKs to notify me when the generated validation catches a change, so at the moment, I have to manually write validation for the WS frame payloads. I truly am a lazy programmer.
I am aware of the stringified-object-as-value situation, but in some languages you can easily manually call code to deserialize the data, so it still benefits "power users", so to speak.

@VinyarionHyarmendacil
Copy link
Contributor Author

@Foorack As far as I can tell, the automation presently just "emits a warning for unreferenced models" by default. I guess that it still generates the source code, because I saw various issues where users wanted it to error if there were unused models, as they didn't want the extra source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants