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

Allow use of FF object schema generator in custom schema defs for anyOf #20

Merged
merged 3 commits into from
Jun 22, 2022

Conversation

peterbroadhurst
Copy link
Contributor

Need a way to be able to define an anyOf schema, which fits nicely with the advanced ffapi option for returning a Schema directly. This is for the RPC-style APIs of connectors, where they take a bunch of different payloads that all have some common headers.

However, currently this custom function can't access all the struct schema generation features, so you have to go fully manual - which seems wrong. So I've updated the interface.

I believe all uses of this customization in FireFly core were removed perviously, because of this kind of restriction meaning they are were too static. We took the hit on losing the extra info on the API description, in favor of ensuring it stayed up to date. So this PR should also open the door to re-instating that going forwards.

…Of use cases

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2022

Codecov Report

Merging #20 (a825551) into main (f598736) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #20   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           29        29           
  Lines         1945      1949    +4     
=========================================
+ Hits          1945      1949    +4     
Impacted Files Coverage Δ
pkg/ffapi/openapi3.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f598736...a825551. Read the comment docs.

@nguyer nguyer merged commit a4927eb into main Jun 22, 2022
@nguyer nguyer deleted the anyof branch June 22, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants