You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sample yaml in the README file works fine, but when I run the code generator against the rather large YAML file found as part of the Open Banking API, it crashes.
% pub run build_runner build --delete-conflicting-outputs
[INFO] Generating build script completed, took 529ms
[INFO] Reading cached asset graph completed, took 186ms
[INFO] Checking for updates since last build completed, took 1.6s
[SEVERE] openapi_code_builder:openapi_code_builder on lib/account-info.openapi.yaml:
Converting object to an encodable object failed: Instance of 'YamlMap'
[INFO] Running build completed, took 483ms
[INFO] Caching finalized dependency graph completed, took 53ms
[SEVERE] Failed after 559ms
finaldynamic tmp =loadYaml(source);
final content = json.encode(tmp)); // error
this should be fixed in yaml package itself! , or this lib should support json file inputs so that user can use service like https://onlineyamltools.com/convert-yaml-to-json , to convert to json and then use it as input.
sorry for the late response.. but imho that yaml schema is not valid..
The keys (status codes) of responsesmust be strings.. because in JSON all keys must be strings. This is probably the reason why json.encode jokes at this point.
Although to be honest, I've developed the generator to generate a simple server/client pair, not necessary generate the client for existing complicated schemas.. but i'll see if I can get it to work.. still interesting.. But I think the best use case is using it for client AND server.. (there are a lot of client side dart generators already out there)
The sample yaml in the README file works fine, but when I run the code generator against the rather large YAML file found as part of the Open Banking API, it crashes.
The YAML file I am using can be found at this URL:
https://raw.githubusercontent.com/OpenBankingUK/read-write-api-specs/master/dist/openapi/account-info-openapi.yaml
The text was updated successfully, but these errors were encountered: