we have a new structure here, where we have one json object that is documented in two different pages.
this update changes checkapis to handle that.
To test, you need to:
have ruby installed
check out fusionauth-client-builder somewhere
in fusionauth-site, run ruby src/check-apis-against-client-json.rb -f $PWD/src/.checkapis.yaml -c $PWD/../fusionauth-client-builder -v
If you see error messages like
Traceback (most recent call last):
4: from src/check-apis-against-client-json.rb:482:in `<main>'
3: from src/check-apis-against-client-json.rb:482:in `each'
2: from src/check-apis-against-client-json.rb:483:in `block in <main>'
1: from src/check-apis-against-client-json.rb:302:in `process_file'
src/check-apis-against-client-json.rb:302:in `is_a?': wrong number of arguments (given 0, expected 1) (ArgumentError)
that means the script didn't succeed
If it works, you should see a large amount of output (drop the -v if you want less), but at the end you should see any objects that have an attribute that was not found on the documentation pages. Here's an example:
$ ruby src/check-apis-against-client-json.rb -f $PWD/src/.checkapis.yaml -c $PWD/../fusionauth-client-builder -v
Checking files:
/Users/dan/work/main/fusionauth-site/../fusionauth-client-builder/src/main/domain/io.fusionauth.domain.AuditLog.json
/Users/dan/work/main/fusionauth-site/../fusionauth-client-builder/src/main/domain/io.fusionauth.domain.Lambda.json
/Users/dan/work/main/fusionauth-site/../fusionauth-client-builder/src/main/domain/io.fusionauth.domain.Webhook.json
/Users/dan/work/main/fusionauth-site/../fusionauth-client-builder/src/main/domain/io.fusionauth.domain.APIKey.json
/Users/dan/work/main/fusionauth-site/../fusionauth-client-builder/src/main/domain/io.fusionauth.domain.Application.json
...
for field_type: Location, found 2 files, picking closest one
/Users/dan/work/main/fusionauth-site/../fusionauth-client-builder/src/main/domain/io.fusionauth.domain.Application$SAMLv2Configuration$XMLSignatureLocation.json
/Users/dan/work/main/fusionauth-site/../fusionauth-client-builder/src/main/domain/io.fusionauth.domain.Location.json
looking for matching inner class
handling special case of Identity Provider lambda config
no inner class found, looking for all other classes, but avoiding other inner classes
found file: /Users/dan/work/main/fusionauth-site/../fusionauth-client-builder/src/main/domain/io.fusionauth.domain.Location.json
opening: /Users/dan/work/main/fusionauth-site/../fusionauth-client-builder/src/main/domain/io.fusionauth.domain.Location.json
processing event.info.location
MISSING FIELDS
{:original_examined_type=>"theme.variables", :full_field_name=>"theme.variables.backgroundImageURL", :type=>"URI"}
{:original_examined_type=>"theme.variables", :full_field_name=>"theme.variables.logoImageURL", :type=>"URI"}
This indicates there are two missing fields on the themes page (or sometimes they are misnamed).
we have a new structure here, where we have one json object that is documented in two different pages.
this update changes checkapis to handle that.
To test, you need to:
ruby src/check-apis-against-client-json.rb -f $PWD/src/.checkapis.yaml -c $PWD/../fusionauth-client-builder -v
If you see error messages like
that means the script didn't succeed
If it works, you should see a large amount of output (drop the -v if you want less), but at the end you should see any objects that have an attribute that was not found on the documentation pages. Here's an example:
This indicates there are two missing fields on the themes page (or sometimes they are misnamed).