permify 0.0.1 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile +6 -1
- data/README.md +241 -16
- data/Rakefile +7 -7
- data/generator/generate-sdk.sh +157 -0
- data/generator/openapi-generator-cli.jar +0 -0
- data/generator/openapi.json +3699 -0
- data/lib/permify/api/bundle_api.rb +238 -0
- data/lib/permify/api/data_api.rb +526 -0
- data/lib/permify/api/permission_api.rb +528 -0
- data/lib/permify/api/schema_api.rb +310 -0
- data/lib/permify/api/tenancy_api.rb +215 -0
- data/lib/permify/api/watch_api.rb +94 -0
- data/lib/permify/api_client.rb +394 -0
- data/lib/permify/api_error.rb +58 -0
- data/lib/permify/configuration.rb +298 -0
- data/lib/permify/models/abstract_type.rb +228 -0
- data/lib/permify/models/any.rb +216 -0
- data/lib/permify/models/argument.rb +215 -0
- data/lib/permify/models/attribute.rb +233 -0
- data/lib/permify/models/attribute_definition.rb +247 -0
- data/lib/permify/models/attribute_filter.rb +226 -0
- data/lib/permify/models/attribute_read_request_metadata.rb +216 -0
- data/lib/permify/models/attribute_read_response.rb +228 -0
- data/lib/permify/models/attribute_type.rb +46 -0
- data/lib/permify/models/bulk_check_body.rb +248 -0
- data/lib/permify/models/bundle_delete_body.rb +216 -0
- data/lib/permify/models/bundle_delete_response.rb +214 -0
- data/lib/permify/models/bundle_read_body.rb +214 -0
- data/lib/permify/models/bundle_read_response.rb +214 -0
- data/lib/permify/models/bundle_run_response.rb +216 -0
- data/lib/permify/models/bundle_write_body.rb +218 -0
- data/lib/permify/models/bundle_write_response.rb +218 -0
- data/lib/permify/models/check_body.rb +264 -0
- data/lib/permify/models/check_result.rb +40 -0
- data/lib/permify/models/checked_expr.rb +258 -0
- data/lib/permify/models/child.rb +224 -0
- data/lib/permify/models/component.rb +41 -0
- data/lib/permify/models/comprehension.rb +281 -0
- data/lib/permify/models/computed_attribute.rb +215 -0
- data/lib/permify/models/computed_user_set.rb +215 -0
- data/lib/permify/models/constant.rb +317 -0
- data/lib/permify/models/context.rb +240 -0
- data/lib/permify/models/create_list.rb +230 -0
- data/lib/permify/models/create_struct.rb +228 -0
- data/lib/permify/models/data_bundle.rb +240 -0
- data/lib/permify/models/data_change.rb +255 -0
- data/lib/permify/models/data_change_operation.rb +40 -0
- data/lib/permify/models/data_changes.rb +228 -0
- data/lib/permify/models/data_delete_body.rb +224 -0
- data/lib/permify/models/data_delete_response.rb +216 -0
- data/lib/permify/models/data_write_body.rb +239 -0
- data/lib/permify/models/data_write_request_metadata.rb +216 -0
- data/lib/permify/models/data_write_response.rb +216 -0
- data/lib/permify/models/delete_relationships_body.rb +214 -0
- data/lib/permify/models/entity.rb +224 -0
- data/lib/permify/models/entity_definition.rb +264 -0
- data/lib/permify/models/entity_definition_reference.rb +41 -0
- data/lib/permify/models/entity_filter.rb +226 -0
- data/lib/permify/models/entry.rb +254 -0
- data/lib/permify/models/expand_leaf.rb +233 -0
- data/lib/permify/models/expand_tree_node.rb +248 -0
- data/lib/permify/models/expand_tree_node_operation.rb +41 -0
- data/lib/permify/models/expr.rb +279 -0
- data/lib/permify/models/expr_call.rb +237 -0
- data/lib/permify/models/extension.rb +236 -0
- data/lib/permify/models/function_type.rb +227 -0
- data/lib/permify/models/ident.rb +216 -0
- data/lib/permify/models/leaf.rb +242 -0
- data/lib/permify/models/list_type.rb +215 -0
- data/lib/permify/models/lookup_entity_body.rb +285 -0
- data/lib/permify/models/lookup_entity_stream_body.rb +285 -0
- data/lib/permify/models/lookup_subject_body.rb +284 -0
- data/lib/permify/models/map_type.rb +224 -0
- data/lib/permify/models/partial_write_body.rb +225 -0
- data/lib/permify/models/partials.rb +238 -0
- data/lib/permify/models/permission_bulk_check_request_item.rb +233 -0
- data/lib/permify/models/permission_bulk_check_response.rb +218 -0
- data/lib/permify/models/permission_check_request_metadata.rb +236 -0
- data/lib/permify/models/permission_check_response.rb +246 -0
- data/lib/permify/models/permission_check_response_metadata.rb +216 -0
- data/lib/permify/models/permission_definition.rb +225 -0
- data/lib/permify/models/permission_expand_body.rb +255 -0
- data/lib/permify/models/permission_expand_request_metadata.rb +226 -0
- data/lib/permify/models/permission_expand_response.rb +215 -0
- data/lib/permify/models/permission_lookup_entity_request_metadata.rb +236 -0
- data/lib/permify/models/permission_lookup_entity_response.rb +228 -0
- data/lib/permify/models/permission_lookup_entity_stream_response.rb +226 -0
- data/lib/permify/models/permission_lookup_subject_request_metadata.rb +236 -0
- data/lib/permify/models/permission_lookup_subject_response.rb +228 -0
- data/lib/permify/models/permission_subject_permission_request_metadata.rb +246 -0
- data/lib/permify/models/permission_subject_permission_response.rb +218 -0
- data/lib/permify/models/primitive_type.rb +44 -0
- data/lib/permify/models/read_attributes_body.rb +244 -0
- data/lib/permify/models/read_relationships_body.rb +244 -0
- data/lib/permify/models/relation_definition.rb +228 -0
- data/lib/permify/models/relation_reference.rb +226 -0
- data/lib/permify/models/relationship_delete_response.rb +215 -0
- data/lib/permify/models/relationship_read_request_metadata.rb +216 -0
- data/lib/permify/models/relationship_read_response.rb +228 -0
- data/lib/permify/models/relationship_write_request_metadata.rb +214 -0
- data/lib/permify/models/relationship_write_response.rb +215 -0
- data/lib/permify/models/rewrite.rb +249 -0
- data/lib/permify/models/rewrite_operation.rb +41 -0
- data/lib/permify/models/rule_definition.rb +237 -0
- data/lib/permify/models/run_bundle_body.rb +228 -0
- data/lib/permify/models/schema_definition.rb +242 -0
- data/lib/permify/models/schema_definition_reference.rb +40 -0
- data/lib/permify/models/schema_list.rb +223 -0
- data/lib/permify/models/schema_list_body.rb +226 -0
- data/lib/permify/models/schema_list_response.rb +235 -0
- data/lib/permify/models/schema_partial_write_request_metadata.rb +216 -0
- data/lib/permify/models/schema_partial_write_response.rb +216 -0
- data/lib/permify/models/schema_read_body.rb +215 -0
- data/lib/permify/models/schema_read_request_metadata.rb +216 -0
- data/lib/permify/models/schema_read_response.rb +215 -0
- data/lib/permify/models/schema_write_body.rb +216 -0
- data/lib/permify/models/schema_write_response.rb +216 -0
- data/lib/permify/models/select.rb +235 -0
- data/lib/permify/models/source_info.rb +274 -0
- data/lib/permify/models/status.rb +234 -0
- data/lib/permify/models/stream_result_of_permission_lookup_entity_stream_response.rb +223 -0
- data/lib/permify/models/stream_result_of_watch_response.rb +223 -0
- data/lib/permify/models/string_array_value.rb +218 -0
- data/lib/permify/models/subject.rb +233 -0
- data/lib/permify/models/subject_filter.rb +235 -0
- data/lib/permify/models/subject_permission_body.rb +242 -0
- data/lib/permify/models/subjects.rb +218 -0
- data/lib/permify/models/tenant.rb +236 -0
- data/lib/permify/models/tenant_create_request.rb +226 -0
- data/lib/permify/models/tenant_create_response.rb +215 -0
- data/lib/permify/models/tenant_delete_response.rb +216 -0
- data/lib/permify/models/tenant_list_request.rb +226 -0
- data/lib/permify/models/tenant_list_response.rb +228 -0
- data/lib/permify/models/tuple.rb +233 -0
- data/lib/permify/models/tuple_filter.rb +233 -0
- data/lib/permify/models/tuple_set.rb +215 -0
- data/lib/permify/models/tuple_to_user_set.rb +224 -0
- data/lib/permify/models/v1_call.rb +226 -0
- data/lib/permify/models/v1_expand.rb +255 -0
- data/lib/permify/models/v1_operation.rb +254 -0
- data/lib/permify/models/v1alpha1_reference.rb +237 -0
- data/lib/permify/models/v1alpha1_type.rb +350 -0
- data/lib/permify/models/values.rb +216 -0
- data/lib/permify/models/version.rb +225 -0
- data/lib/permify/models/watch_body.rb +216 -0
- data/lib/permify/models/watch_response.rb +215 -0
- data/lib/permify/models/well_known_type.rb +41 -0
- data/lib/permify/models/write_relationships_body.rb +227 -0
- data/lib/permify/version.rb +13 -1
- data/lib/permify.rb +175 -15
- data/permify-ruby.gemspec +39 -0
- data/permify.gemspec +38 -27
- data/spec/api/bundle_api_spec.rb +71 -0
- data/spec/api/data_api_spec.rb +119 -0
- data/spec/api/permission_api_spec.rb +120 -0
- data/spec/api/schema_api_spec.rb +83 -0
- data/spec/api/tenancy_api_spec.rb +68 -0
- data/spec/api/watch_api_spec.rb +47 -0
- data/spec/models/abstract_type_spec.rb +42 -0
- data/spec/models/any_spec.rb +36 -0
- data/spec/models/argument_spec.rb +36 -0
- data/spec/models/attribute_definition_spec.rb +42 -0
- data/spec/models/attribute_filter_spec.rb +42 -0
- data/spec/models/attribute_read_request_metadata_spec.rb +36 -0
- data/spec/models/attribute_read_response_spec.rb +42 -0
- data/spec/models/attribute_spec.rb +48 -0
- data/spec/models/attribute_type_spec.rb +30 -0
- data/spec/models/bulk_check_body_spec.rb +54 -0
- data/spec/models/bundle_delete_body_spec.rb +36 -0
- data/spec/models/bundle_delete_response_spec.rb +36 -0
- data/spec/models/bundle_read_body_spec.rb +36 -0
- data/spec/models/bundle_read_response_spec.rb +36 -0
- data/spec/models/bundle_run_response_spec.rb +36 -0
- data/spec/models/bundle_write_body_spec.rb +36 -0
- data/spec/models/bundle_write_response_spec.rb +36 -0
- data/spec/models/check_body_spec.rb +66 -0
- data/spec/models/check_result_spec.rb +30 -0
- data/spec/models/checked_expr_spec.rb +60 -0
- data/spec/models/child_spec.rb +42 -0
- data/spec/models/component_spec.rb +30 -0
- data/spec/models/comprehension_spec.rb +78 -0
- data/spec/models/computed_attribute_spec.rb +36 -0
- data/spec/models/computed_user_set_spec.rb +36 -0
- data/spec/models/constant_spec.rb +84 -0
- data/spec/models/context_spec.rb +48 -0
- data/spec/models/create_list_spec.rb +42 -0
- data/spec/models/create_struct_spec.rb +42 -0
- data/spec/models/data_bundle_spec.rb +48 -0
- data/spec/models/data_change_operation_spec.rb +30 -0
- data/spec/models/data_change_spec.rb +48 -0
- data/spec/models/data_changes_spec.rb +42 -0
- data/spec/models/data_delete_body_spec.rb +42 -0
- data/spec/models/data_delete_response_spec.rb +36 -0
- data/spec/models/data_write_body_spec.rb +48 -0
- data/spec/models/data_write_request_metadata_spec.rb +36 -0
- data/spec/models/data_write_response_spec.rb +36 -0
- data/spec/models/delete_relationships_body_spec.rb +36 -0
- data/spec/models/entity_definition_reference_spec.rb +30 -0
- data/spec/models/entity_definition_spec.rb +60 -0
- data/spec/models/entity_filter_spec.rb +42 -0
- data/spec/models/entity_spec.rb +42 -0
- data/spec/models/entry_spec.rb +60 -0
- data/spec/models/expand_leaf_spec.rb +48 -0
- data/spec/models/expand_tree_node_operation_spec.rb +30 -0
- data/spec/models/expand_tree_node_spec.rb +42 -0
- data/spec/models/expr_call_spec.rb +48 -0
- data/spec/models/expr_spec.rb +78 -0
- data/spec/models/extension_spec.rb +48 -0
- data/spec/models/function_type_spec.rb +42 -0
- data/spec/models/ident_spec.rb +36 -0
- data/spec/models/leaf_spec.rb +54 -0
- data/spec/models/list_type_spec.rb +36 -0
- data/spec/models/lookup_entity_body_spec.rb +78 -0
- data/spec/models/lookup_entity_stream_body_spec.rb +78 -0
- data/spec/models/lookup_subject_body_spec.rb +78 -0
- data/spec/models/map_type_spec.rb +42 -0
- data/spec/models/partial_write_body_spec.rb +42 -0
- data/spec/models/partials_spec.rb +48 -0
- data/spec/models/permission_bulk_check_request_item_spec.rb +48 -0
- data/spec/models/permission_bulk_check_response_spec.rb +36 -0
- data/spec/models/permission_check_request_metadata_spec.rb +48 -0
- data/spec/models/permission_check_response_metadata_spec.rb +36 -0
- data/spec/models/permission_check_response_spec.rb +42 -0
- data/spec/models/permission_definition_spec.rb +42 -0
- data/spec/models/permission_expand_body_spec.rb +60 -0
- data/spec/models/permission_expand_request_metadata_spec.rb +42 -0
- data/spec/models/permission_expand_response_spec.rb +36 -0
- data/spec/models/permission_lookup_entity_request_metadata_spec.rb +48 -0
- data/spec/models/permission_lookup_entity_response_spec.rb +42 -0
- data/spec/models/permission_lookup_entity_stream_response_spec.rb +42 -0
- data/spec/models/permission_lookup_subject_request_metadata_spec.rb +48 -0
- data/spec/models/permission_lookup_subject_response_spec.rb +42 -0
- data/spec/models/permission_subject_permission_request_metadata_spec.rb +54 -0
- data/spec/models/permission_subject_permission_response_spec.rb +36 -0
- data/spec/models/primitive_type_spec.rb +30 -0
- data/spec/models/read_attributes_body_spec.rb +54 -0
- data/spec/models/read_relationships_body_spec.rb +54 -0
- data/spec/models/relation_definition_spec.rb +42 -0
- data/spec/models/relation_reference_spec.rb +42 -0
- data/spec/models/relationship_delete_response_spec.rb +36 -0
- data/spec/models/relationship_read_request_metadata_spec.rb +36 -0
- data/spec/models/relationship_read_response_spec.rb +42 -0
- data/spec/models/relationship_write_request_metadata_spec.rb +36 -0
- data/spec/models/relationship_write_response_spec.rb +36 -0
- data/spec/models/rewrite_operation_spec.rb +30 -0
- data/spec/models/rewrite_spec.rb +42 -0
- data/spec/models/rule_definition_spec.rb +48 -0
- data/spec/models/run_bundle_body_spec.rb +42 -0
- data/spec/models/schema_definition_reference_spec.rb +30 -0
- data/spec/models/schema_definition_spec.rb +48 -0
- data/spec/models/schema_list_body_spec.rb +42 -0
- data/spec/models/schema_list_response_spec.rb +48 -0
- data/spec/models/schema_list_spec.rb +42 -0
- data/spec/models/schema_partial_write_request_metadata_spec.rb +36 -0
- data/spec/models/schema_partial_write_response_spec.rb +36 -0
- data/spec/models/schema_read_body_spec.rb +36 -0
- data/spec/models/schema_read_request_metadata_spec.rb +36 -0
- data/spec/models/schema_read_response_spec.rb +36 -0
- data/spec/models/schema_write_body_spec.rb +36 -0
- data/spec/models/schema_write_response_spec.rb +36 -0
- data/spec/models/select_spec.rb +48 -0
- data/spec/models/source_info_spec.rb +66 -0
- data/spec/models/status_spec.rb +48 -0
- data/spec/models/stream_result_of_permission_lookup_entity_stream_response_spec.rb +42 -0
- data/spec/models/stream_result_of_watch_response_spec.rb +42 -0
- data/spec/models/string_array_value_spec.rb +36 -0
- data/spec/models/subject_filter_spec.rb +48 -0
- data/spec/models/subject_permission_body_spec.rb +54 -0
- data/spec/models/subject_spec.rb +48 -0
- data/spec/models/subjects_spec.rb +36 -0
- data/spec/models/tenant_create_request_spec.rb +42 -0
- data/spec/models/tenant_create_response_spec.rb +36 -0
- data/spec/models/tenant_delete_response_spec.rb +36 -0
- data/spec/models/tenant_list_request_spec.rb +42 -0
- data/spec/models/tenant_list_response_spec.rb +42 -0
- data/spec/models/tenant_spec.rb +48 -0
- data/spec/models/tuple_filter_spec.rb +48 -0
- data/spec/models/tuple_set_spec.rb +36 -0
- data/spec/models/tuple_spec.rb +48 -0
- data/spec/models/tuple_to_user_set_spec.rb +42 -0
- data/spec/models/v1_call_spec.rb +42 -0
- data/spec/models/v1_expand_spec.rb +60 -0
- data/spec/models/v1_operation_spec.rb +54 -0
- data/spec/models/v1alpha1_reference_spec.rb +48 -0
- data/spec/models/v1alpha1_type_spec.rb +108 -0
- data/spec/models/values_spec.rb +36 -0
- data/spec/models/version_spec.rb +42 -0
- data/spec/models/watch_body_spec.rb +36 -0
- data/spec/models/watch_response_spec.rb +36 -0
- data/spec/models/well_known_type_spec.rb +30 -0
- data/spec/models/write_relationships_body_spec.rb +42 -0
- data/spec/spec_helper.rb +101 -3
- metadata +449 -85
- data/.gitignore +0 -17
- data/.rspec +0 -2
- data/LICENSE.txt +0 -22
- data/lib/permify/authorization.rb +0 -17
- data/lib/permify/clearance.rb +0 -29
- data/lib/permify/permission/combination/any.rb +0 -13
- data/lib/permify/permission/combination.rb +0 -4
- data/lib/permify/permission/combination_map.rb +0 -23
- data/lib/permify/permission/dynamic.rb +0 -13
- data/lib/permify/permission/null.rb +0 -7
- data/lib/permify/permission/static.rb +0 -7
- data/lib/permify/permission.rb +0 -10
- data/lib/permify/permission_map.rb +0 -32
- data/lib/permify/repository.rb +0 -68
- data/spec/integration_spec.rb +0 -114
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 413ddb693b8500f305b871d96273f153a12d597b80dce03bf2841a78894dc032
|
|
4
|
+
data.tar.gz: ef7da0f6cc9150df9bc4636f108f1291060f5fdbb3648a85a5a5014f4a329e8b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3684357ba97c16db6f1f159a02ba2030cbbe78bd66fad14be0ec0e0010d55cfd8ed7f7cffb95842e28dfd47a72346030374c329fe8250957bd0200bb3fb5b21
|
|
7
|
+
data.tar.gz: 507219ec754da4305b6418976457bb3cae1988e0dc4277d86daca6f93d1741057763b8d32410348687010cc8d40bec9dce4763b47cb3ebd07885771a4327e381
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,29 +1,254 @@
|
|
|
1
|
-
#
|
|
1
|
+
# permify
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Permify - the Ruby gem for the Permify API
|
|
4
|
+
|
|
5
|
+
Permify is an open source authorization service for creating fine-grained and scalable authorization systems.
|
|
6
|
+
|
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
|
+
|
|
9
|
+
- API version: v1.5.4
|
|
10
|
+
- Package version: 1.5.4
|
|
11
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
|
+
For more information, please visit [https://github.com/Permify/permify/issues](https://github.com/Permify/permify/issues)
|
|
4
13
|
|
|
5
14
|
## Installation
|
|
6
15
|
|
|
7
|
-
|
|
16
|
+
### Build a gem
|
|
17
|
+
|
|
18
|
+
To build the Ruby code into a gem:
|
|
19
|
+
|
|
20
|
+
```shell
|
|
21
|
+
gem build permify.gemspec
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then either install the gem locally:
|
|
25
|
+
|
|
26
|
+
```shell
|
|
27
|
+
gem install ./permify-1.5.4.gem
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
(for development, run `gem install --dev ./permify-1.5.4.gem` to install the development dependencies)
|
|
31
|
+
|
|
32
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
33
|
+
|
|
34
|
+
Finally add this to the Gemfile:
|
|
35
|
+
|
|
36
|
+
gem 'permify', '~> 1.5.4'
|
|
37
|
+
|
|
38
|
+
### Install from Git
|
|
39
|
+
|
|
40
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
|
41
|
+
|
|
42
|
+
gem 'permify', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
|
43
|
+
|
|
44
|
+
### Include the Ruby code directly
|
|
45
|
+
|
|
46
|
+
Include the Ruby code directly using `-I` as follows:
|
|
47
|
+
|
|
48
|
+
```shell
|
|
49
|
+
ruby -Ilib script.rb
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Getting Started
|
|
53
|
+
|
|
54
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
# Load the gem
|
|
58
|
+
require 'permify'
|
|
59
|
+
|
|
60
|
+
api_instance = Permify::BundleApi.new
|
|
61
|
+
tenant_id = 'tenant_id_example' # String | Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
62
|
+
body = Permify::BundleDeleteBody.new # BundleDeleteBody |
|
|
63
|
+
|
|
64
|
+
begin
|
|
65
|
+
#delete bundle
|
|
66
|
+
result = api_instance.bundle_delete(tenant_id, body)
|
|
67
|
+
p result
|
|
68
|
+
rescue Permify::ApiError => e
|
|
69
|
+
puts "Exception when calling BundleApi->bundle_delete: #{e}"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Documentation for API Endpoints
|
|
75
|
+
|
|
76
|
+
All URIs are relative to *http://localhost*
|
|
77
|
+
|
|
78
|
+
Class | Method | HTTP request | Description
|
|
79
|
+
------------ | ------------- | ------------- | -------------
|
|
80
|
+
*Permify::BundleApi* | [**bundle_delete**](docs/BundleApi.md#bundle_delete) | **POST** /v1/tenants/{tenant_id}/bundle/delete | delete bundle
|
|
81
|
+
*Permify::BundleApi* | [**bundle_read**](docs/BundleApi.md#bundle_read) | **POST** /v1/tenants/{tenant_id}/bundle/read | read bundle
|
|
82
|
+
*Permify::BundleApi* | [**bundle_write**](docs/BundleApi.md#bundle_write) | **POST** /v1/tenants/{tenant_id}/bundle/write | write bundle
|
|
83
|
+
*Permify::DataApi* | [**bundle_run**](docs/DataApi.md#bundle_run) | **POST** /v1/tenants/{tenant_id}/data/run-bundle | run bundle
|
|
84
|
+
*Permify::DataApi* | [**data_attributes_read**](docs/DataApi.md#data_attributes_read) | **POST** /v1/tenants/{tenant_id}/data/attributes/read | read attributes
|
|
85
|
+
*Permify::DataApi* | [**data_delete**](docs/DataApi.md#data_delete) | **POST** /v1/tenants/{tenant_id}/data/delete | delete data
|
|
86
|
+
*Permify::DataApi* | [**data_relationships_read**](docs/DataApi.md#data_relationships_read) | **POST** /v1/tenants/{tenant_id}/data/relationships/read | read relationships
|
|
87
|
+
*Permify::DataApi* | [**data_write**](docs/DataApi.md#data_write) | **POST** /v1/tenants/{tenant_id}/data/write | write data
|
|
88
|
+
*Permify::DataApi* | [**relationships_delete**](docs/DataApi.md#relationships_delete) | **POST** /v1/tenants/{tenant_id}/relationships/delete | delete relationships
|
|
89
|
+
*Permify::DataApi* | [**relationships_write**](docs/DataApi.md#relationships_write) | **POST** /v1/tenants/{tenant_id}/relationships/write | write relationships
|
|
90
|
+
*Permify::PermissionApi* | [**permissions_bulk_check**](docs/PermissionApi.md#permissions_bulk_check) | **POST** /v1/tenants/{tenant_id}/permissions/bulk-check | bulk check api
|
|
91
|
+
*Permify::PermissionApi* | [**permissions_check**](docs/PermissionApi.md#permissions_check) | **POST** /v1/tenants/{tenant_id}/permissions/check | check api
|
|
92
|
+
*Permify::PermissionApi* | [**permissions_expand**](docs/PermissionApi.md#permissions_expand) | **POST** /v1/tenants/{tenant_id}/permissions/expand | expand api
|
|
93
|
+
*Permify::PermissionApi* | [**permissions_lookup_entity**](docs/PermissionApi.md#permissions_lookup_entity) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity | lookup entity
|
|
94
|
+
*Permify::PermissionApi* | [**permissions_lookup_entity_stream**](docs/PermissionApi.md#permissions_lookup_entity_stream) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity-stream | lookup entity stream
|
|
95
|
+
*Permify::PermissionApi* | [**permissions_lookup_subject**](docs/PermissionApi.md#permissions_lookup_subject) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-subject | lookup-subject
|
|
96
|
+
*Permify::PermissionApi* | [**permissions_subject_permission**](docs/PermissionApi.md#permissions_subject_permission) | **POST** /v1/tenants/{tenant_id}/permissions/subject-permission | subject permission
|
|
97
|
+
*Permify::SchemaApi* | [**schemas_list**](docs/SchemaApi.md#schemas_list) | **POST** /v1/tenants/{tenant_id}/schemas/list | list schema
|
|
98
|
+
*Permify::SchemaApi* | [**schemas_partial_write**](docs/SchemaApi.md#schemas_partial_write) | **PATCH** /v1/tenants/{tenant_id}/schemas/partial-write | partially update your authorization model
|
|
99
|
+
*Permify::SchemaApi* | [**schemas_read**](docs/SchemaApi.md#schemas_read) | **POST** /v1/tenants/{tenant_id}/schemas/read | read schema
|
|
100
|
+
*Permify::SchemaApi* | [**schemas_write**](docs/SchemaApi.md#schemas_write) | **POST** /v1/tenants/{tenant_id}/schemas/write | write schema
|
|
101
|
+
*Permify::TenancyApi* | [**tenants_create**](docs/TenancyApi.md#tenants_create) | **POST** /v1/tenants/create | create tenant
|
|
102
|
+
*Permify::TenancyApi* | [**tenants_delete**](docs/TenancyApi.md#tenants_delete) | **DELETE** /v1/tenants/{id} | delete tenant
|
|
103
|
+
*Permify::TenancyApi* | [**tenants_list**](docs/TenancyApi.md#tenants_list) | **POST** /v1/tenants/list | list tenants
|
|
104
|
+
*Permify::WatchApi* | [**watch_watch**](docs/WatchApi.md#watch_watch) | **POST** /v1/tenants/{tenant_id}/watch | watch changes
|
|
105
|
+
|
|
8
106
|
|
|
9
|
-
|
|
107
|
+
## Documentation for Models
|
|
10
108
|
|
|
11
|
-
|
|
109
|
+
- [Permify::AbstractType](docs/AbstractType.md)
|
|
110
|
+
- [Permify::Any](docs/Any.md)
|
|
111
|
+
- [Permify::Argument](docs/Argument.md)
|
|
112
|
+
- [Permify::Attribute](docs/Attribute.md)
|
|
113
|
+
- [Permify::AttributeDefinition](docs/AttributeDefinition.md)
|
|
114
|
+
- [Permify::AttributeFilter](docs/AttributeFilter.md)
|
|
115
|
+
- [Permify::AttributeReadRequestMetadata](docs/AttributeReadRequestMetadata.md)
|
|
116
|
+
- [Permify::AttributeReadResponse](docs/AttributeReadResponse.md)
|
|
117
|
+
- [Permify::AttributeType](docs/AttributeType.md)
|
|
118
|
+
- [Permify::BulkCheckBody](docs/BulkCheckBody.md)
|
|
119
|
+
- [Permify::BundleDeleteBody](docs/BundleDeleteBody.md)
|
|
120
|
+
- [Permify::BundleDeleteResponse](docs/BundleDeleteResponse.md)
|
|
121
|
+
- [Permify::BundleReadBody](docs/BundleReadBody.md)
|
|
122
|
+
- [Permify::BundleReadResponse](docs/BundleReadResponse.md)
|
|
123
|
+
- [Permify::BundleRunResponse](docs/BundleRunResponse.md)
|
|
124
|
+
- [Permify::BundleWriteBody](docs/BundleWriteBody.md)
|
|
125
|
+
- [Permify::BundleWriteResponse](docs/BundleWriteResponse.md)
|
|
126
|
+
- [Permify::CheckBody](docs/CheckBody.md)
|
|
127
|
+
- [Permify::CheckResult](docs/CheckResult.md)
|
|
128
|
+
- [Permify::CheckedExpr](docs/CheckedExpr.md)
|
|
129
|
+
- [Permify::Child](docs/Child.md)
|
|
130
|
+
- [Permify::Component](docs/Component.md)
|
|
131
|
+
- [Permify::Comprehension](docs/Comprehension.md)
|
|
132
|
+
- [Permify::ComputedAttribute](docs/ComputedAttribute.md)
|
|
133
|
+
- [Permify::ComputedUserSet](docs/ComputedUserSet.md)
|
|
134
|
+
- [Permify::Constant](docs/Constant.md)
|
|
135
|
+
- [Permify::Context](docs/Context.md)
|
|
136
|
+
- [Permify::CreateList](docs/CreateList.md)
|
|
137
|
+
- [Permify::CreateStruct](docs/CreateStruct.md)
|
|
138
|
+
- [Permify::DataBundle](docs/DataBundle.md)
|
|
139
|
+
- [Permify::DataChange](docs/DataChange.md)
|
|
140
|
+
- [Permify::DataChangeOperation](docs/DataChangeOperation.md)
|
|
141
|
+
- [Permify::DataChanges](docs/DataChanges.md)
|
|
142
|
+
- [Permify::DataDeleteBody](docs/DataDeleteBody.md)
|
|
143
|
+
- [Permify::DataDeleteResponse](docs/DataDeleteResponse.md)
|
|
144
|
+
- [Permify::DataWriteBody](docs/DataWriteBody.md)
|
|
145
|
+
- [Permify::DataWriteRequestMetadata](docs/DataWriteRequestMetadata.md)
|
|
146
|
+
- [Permify::DataWriteResponse](docs/DataWriteResponse.md)
|
|
147
|
+
- [Permify::DeleteRelationshipsBody](docs/DeleteRelationshipsBody.md)
|
|
148
|
+
- [Permify::Entity](docs/Entity.md)
|
|
149
|
+
- [Permify::EntityDefinition](docs/EntityDefinition.md)
|
|
150
|
+
- [Permify::EntityDefinitionReference](docs/EntityDefinitionReference.md)
|
|
151
|
+
- [Permify::EntityFilter](docs/EntityFilter.md)
|
|
152
|
+
- [Permify::Entry](docs/Entry.md)
|
|
153
|
+
- [Permify::ExpandLeaf](docs/ExpandLeaf.md)
|
|
154
|
+
- [Permify::ExpandTreeNode](docs/ExpandTreeNode.md)
|
|
155
|
+
- [Permify::ExpandTreeNodeOperation](docs/ExpandTreeNodeOperation.md)
|
|
156
|
+
- [Permify::Expr](docs/Expr.md)
|
|
157
|
+
- [Permify::ExprCall](docs/ExprCall.md)
|
|
158
|
+
- [Permify::Extension](docs/Extension.md)
|
|
159
|
+
- [Permify::FunctionType](docs/FunctionType.md)
|
|
160
|
+
- [Permify::Ident](docs/Ident.md)
|
|
161
|
+
- [Permify::Leaf](docs/Leaf.md)
|
|
162
|
+
- [Permify::ListType](docs/ListType.md)
|
|
163
|
+
- [Permify::LookupEntityBody](docs/LookupEntityBody.md)
|
|
164
|
+
- [Permify::LookupEntityStreamBody](docs/LookupEntityStreamBody.md)
|
|
165
|
+
- [Permify::LookupSubjectBody](docs/LookupSubjectBody.md)
|
|
166
|
+
- [Permify::MapType](docs/MapType.md)
|
|
167
|
+
- [Permify::PartialWriteBody](docs/PartialWriteBody.md)
|
|
168
|
+
- [Permify::Partials](docs/Partials.md)
|
|
169
|
+
- [Permify::PermissionBulkCheckRequestItem](docs/PermissionBulkCheckRequestItem.md)
|
|
170
|
+
- [Permify::PermissionBulkCheckResponse](docs/PermissionBulkCheckResponse.md)
|
|
171
|
+
- [Permify::PermissionCheckRequestMetadata](docs/PermissionCheckRequestMetadata.md)
|
|
172
|
+
- [Permify::PermissionCheckResponse](docs/PermissionCheckResponse.md)
|
|
173
|
+
- [Permify::PermissionCheckResponseMetadata](docs/PermissionCheckResponseMetadata.md)
|
|
174
|
+
- [Permify::PermissionDefinition](docs/PermissionDefinition.md)
|
|
175
|
+
- [Permify::PermissionExpandBody](docs/PermissionExpandBody.md)
|
|
176
|
+
- [Permify::PermissionExpandRequestMetadata](docs/PermissionExpandRequestMetadata.md)
|
|
177
|
+
- [Permify::PermissionExpandResponse](docs/PermissionExpandResponse.md)
|
|
178
|
+
- [Permify::PermissionLookupEntityRequestMetadata](docs/PermissionLookupEntityRequestMetadata.md)
|
|
179
|
+
- [Permify::PermissionLookupEntityResponse](docs/PermissionLookupEntityResponse.md)
|
|
180
|
+
- [Permify::PermissionLookupEntityStreamResponse](docs/PermissionLookupEntityStreamResponse.md)
|
|
181
|
+
- [Permify::PermissionLookupSubjectRequestMetadata](docs/PermissionLookupSubjectRequestMetadata.md)
|
|
182
|
+
- [Permify::PermissionLookupSubjectResponse](docs/PermissionLookupSubjectResponse.md)
|
|
183
|
+
- [Permify::PermissionSubjectPermissionRequestMetadata](docs/PermissionSubjectPermissionRequestMetadata.md)
|
|
184
|
+
- [Permify::PermissionSubjectPermissionResponse](docs/PermissionSubjectPermissionResponse.md)
|
|
185
|
+
- [Permify::PrimitiveType](docs/PrimitiveType.md)
|
|
186
|
+
- [Permify::ReadAttributesBody](docs/ReadAttributesBody.md)
|
|
187
|
+
- [Permify::ReadRelationshipsBody](docs/ReadRelationshipsBody.md)
|
|
188
|
+
- [Permify::RelationDefinition](docs/RelationDefinition.md)
|
|
189
|
+
- [Permify::RelationReference](docs/RelationReference.md)
|
|
190
|
+
- [Permify::RelationshipDeleteResponse](docs/RelationshipDeleteResponse.md)
|
|
191
|
+
- [Permify::RelationshipReadRequestMetadata](docs/RelationshipReadRequestMetadata.md)
|
|
192
|
+
- [Permify::RelationshipReadResponse](docs/RelationshipReadResponse.md)
|
|
193
|
+
- [Permify::RelationshipWriteRequestMetadata](docs/RelationshipWriteRequestMetadata.md)
|
|
194
|
+
- [Permify::RelationshipWriteResponse](docs/RelationshipWriteResponse.md)
|
|
195
|
+
- [Permify::Rewrite](docs/Rewrite.md)
|
|
196
|
+
- [Permify::RewriteOperation](docs/RewriteOperation.md)
|
|
197
|
+
- [Permify::RuleDefinition](docs/RuleDefinition.md)
|
|
198
|
+
- [Permify::RunBundleBody](docs/RunBundleBody.md)
|
|
199
|
+
- [Permify::SchemaDefinition](docs/SchemaDefinition.md)
|
|
200
|
+
- [Permify::SchemaDefinitionReference](docs/SchemaDefinitionReference.md)
|
|
201
|
+
- [Permify::SchemaList](docs/SchemaList.md)
|
|
202
|
+
- [Permify::SchemaListBody](docs/SchemaListBody.md)
|
|
203
|
+
- [Permify::SchemaListResponse](docs/SchemaListResponse.md)
|
|
204
|
+
- [Permify::SchemaPartialWriteRequestMetadata](docs/SchemaPartialWriteRequestMetadata.md)
|
|
205
|
+
- [Permify::SchemaPartialWriteResponse](docs/SchemaPartialWriteResponse.md)
|
|
206
|
+
- [Permify::SchemaReadBody](docs/SchemaReadBody.md)
|
|
207
|
+
- [Permify::SchemaReadRequestMetadata](docs/SchemaReadRequestMetadata.md)
|
|
208
|
+
- [Permify::SchemaReadResponse](docs/SchemaReadResponse.md)
|
|
209
|
+
- [Permify::SchemaWriteBody](docs/SchemaWriteBody.md)
|
|
210
|
+
- [Permify::SchemaWriteResponse](docs/SchemaWriteResponse.md)
|
|
211
|
+
- [Permify::Select](docs/Select.md)
|
|
212
|
+
- [Permify::SourceInfo](docs/SourceInfo.md)
|
|
213
|
+
- [Permify::Status](docs/Status.md)
|
|
214
|
+
- [Permify::StreamResultOfPermissionLookupEntityStreamResponse](docs/StreamResultOfPermissionLookupEntityStreamResponse.md)
|
|
215
|
+
- [Permify::StreamResultOfWatchResponse](docs/StreamResultOfWatchResponse.md)
|
|
216
|
+
- [Permify::StringArrayValue](docs/StringArrayValue.md)
|
|
217
|
+
- [Permify::Subject](docs/Subject.md)
|
|
218
|
+
- [Permify::SubjectFilter](docs/SubjectFilter.md)
|
|
219
|
+
- [Permify::SubjectPermissionBody](docs/SubjectPermissionBody.md)
|
|
220
|
+
- [Permify::Subjects](docs/Subjects.md)
|
|
221
|
+
- [Permify::Tenant](docs/Tenant.md)
|
|
222
|
+
- [Permify::TenantCreateRequest](docs/TenantCreateRequest.md)
|
|
223
|
+
- [Permify::TenantCreateResponse](docs/TenantCreateResponse.md)
|
|
224
|
+
- [Permify::TenantDeleteResponse](docs/TenantDeleteResponse.md)
|
|
225
|
+
- [Permify::TenantListRequest](docs/TenantListRequest.md)
|
|
226
|
+
- [Permify::TenantListResponse](docs/TenantListResponse.md)
|
|
227
|
+
- [Permify::Tuple](docs/Tuple.md)
|
|
228
|
+
- [Permify::TupleFilter](docs/TupleFilter.md)
|
|
229
|
+
- [Permify::TupleSet](docs/TupleSet.md)
|
|
230
|
+
- [Permify::TupleToUserSet](docs/TupleToUserSet.md)
|
|
231
|
+
- [Permify::V1Call](docs/V1Call.md)
|
|
232
|
+
- [Permify::V1Expand](docs/V1Expand.md)
|
|
233
|
+
- [Permify::V1Operation](docs/V1Operation.md)
|
|
234
|
+
- [Permify::V1alpha1Reference](docs/V1alpha1Reference.md)
|
|
235
|
+
- [Permify::V1alpha1Type](docs/V1alpha1Type.md)
|
|
236
|
+
- [Permify::Values](docs/Values.md)
|
|
237
|
+
- [Permify::Version](docs/Version.md)
|
|
238
|
+
- [Permify::WatchBody](docs/WatchBody.md)
|
|
239
|
+
- [Permify::WatchResponse](docs/WatchResponse.md)
|
|
240
|
+
- [Permify::WellKnownType](docs/WellKnownType.md)
|
|
241
|
+
- [Permify::WriteRelationshipsBody](docs/WriteRelationshipsBody.md)
|
|
12
242
|
|
|
13
|
-
$ bundle
|
|
14
243
|
|
|
15
|
-
|
|
244
|
+
## Documentation for Authorization
|
|
16
245
|
|
|
17
|
-
$ gem install permify
|
|
18
246
|
|
|
19
|
-
|
|
247
|
+
Authentication schemes defined for the API:
|
|
248
|
+
### ApiKeyAuth
|
|
20
249
|
|
|
21
|
-
TODO: Write usage instructions here
|
|
22
250
|
|
|
23
|
-
|
|
251
|
+
- **Type**: API key
|
|
252
|
+
- **API key parameter name**: Authorization
|
|
253
|
+
- **Location**: HTTP header
|
|
24
254
|
|
|
25
|
-
1. Fork it ( http://github.com/<my-github-username>/permify/fork )
|
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
27
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
28
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
|
29
|
-
5. Create new Pull Request
|
data/Rakefile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require
|
|
2
|
-
require 'rspec/core/rake_task'
|
|
1
|
+
require "bundler/gem_tasks"
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
begin
|
|
4
|
+
require 'rspec/core/rake_task'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
7
|
+
task default: :spec
|
|
8
|
+
rescue LoadError
|
|
9
|
+
# no rspec available
|
|
10
10
|
end
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
+
PROJECT_ROOT="${SCRIPT_DIR}/.."
|
|
7
|
+
DEFAULT_OPENAPI_FILE="${SCRIPT_DIR}/openapi.json"
|
|
8
|
+
DEFAULT_GEM_NAME="permify"
|
|
9
|
+
DEFAULT_MODULE_NAME="Permify"
|
|
10
|
+
|
|
11
|
+
usage() {
|
|
12
|
+
echo "Usage: $0 [OPTIONS]"
|
|
13
|
+
echo ""
|
|
14
|
+
echo "Generate Ruby SDK from OpenAPI specification and update project directory"
|
|
15
|
+
echo ""
|
|
16
|
+
echo "Options:"
|
|
17
|
+
echo " -i, --input FILE OpenAPI JSON file (default: ${DEFAULT_OPENAPI_FILE})"
|
|
18
|
+
echo " -g, --gem NAME Ruby gem name (default: ${DEFAULT_GEM_NAME})"
|
|
19
|
+
echo " -m, --module NAME Module name (default: ${DEFAULT_MODULE_NAME})"
|
|
20
|
+
echo " -h, --help Show this help message"
|
|
21
|
+
echo ""
|
|
22
|
+
echo "This script will update the following:"
|
|
23
|
+
echo " - ../lib (generated Ruby SDK library)"
|
|
24
|
+
echo ""
|
|
25
|
+
echo "Examples:"
|
|
26
|
+
echo " $0 # Use defaults"
|
|
27
|
+
echo " $0 -i swagger.json # Custom input file"
|
|
28
|
+
echo " $0 -g custom-gem -m CustomModule # Custom gem and module name"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
OPENAPI_FILE="${DEFAULT_OPENAPI_FILE}"
|
|
32
|
+
GEM_NAME="${DEFAULT_GEM_NAME}"
|
|
33
|
+
MODULE_NAME="${DEFAULT_MODULE_NAME}"
|
|
34
|
+
|
|
35
|
+
while [[ $# -gt 0 ]]; do
|
|
36
|
+
case $1 in
|
|
37
|
+
-i|--input)
|
|
38
|
+
OPENAPI_FILE="$2"
|
|
39
|
+
shift 2
|
|
40
|
+
;;
|
|
41
|
+
-g|--gem)
|
|
42
|
+
GEM_NAME="$2"
|
|
43
|
+
shift 2
|
|
44
|
+
;;
|
|
45
|
+
-m|--module)
|
|
46
|
+
MODULE_NAME="$2"
|
|
47
|
+
shift 2
|
|
48
|
+
;;
|
|
49
|
+
-h|--help)
|
|
50
|
+
usage
|
|
51
|
+
exit 0
|
|
52
|
+
;;
|
|
53
|
+
*)
|
|
54
|
+
echo "Unknown option: $1"
|
|
55
|
+
usage
|
|
56
|
+
exit 1
|
|
57
|
+
;;
|
|
58
|
+
esac
|
|
59
|
+
done
|
|
60
|
+
|
|
61
|
+
if [[ ! -f "${OPENAPI_FILE}" ]]; then
|
|
62
|
+
echo "Error: OpenAPI file '${OPENAPI_FILE}' not found"
|
|
63
|
+
exit 1
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
# Check if Java is available
|
|
67
|
+
if ! command -v java &> /dev/null; then
|
|
68
|
+
echo "Error: Java is required but not installed"
|
|
69
|
+
exit 1
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
TEMP_OUTPUT_DIR=$(mktemp -d)
|
|
73
|
+
trap 'rm -rf "${TEMP_OUTPUT_DIR}"' EXIT
|
|
74
|
+
|
|
75
|
+
OPENAPI_ABSOLUTE_PATH=$(realpath "${OPENAPI_FILE}")
|
|
76
|
+
|
|
77
|
+
OPENAPI_VERSION=$(grep -o '"version": *"[^"]*"' "${OPENAPI_FILE}" | cut -d '"' -f 4)
|
|
78
|
+
if [[ -z "${OPENAPI_VERSION}" ]]; then
|
|
79
|
+
echo "Error: Could not extract version from OpenAPI file"
|
|
80
|
+
exit 1
|
|
81
|
+
fi
|
|
82
|
+
OPENAPI_VERSION="${OPENAPI_VERSION#v}"
|
|
83
|
+
|
|
84
|
+
echo "Generating Ruby SDK..."
|
|
85
|
+
echo " OpenAPI file: ${OPENAPI_ABSOLUTE_PATH}"
|
|
86
|
+
echo " OpenAPI version: ${OPENAPI_VERSION}"
|
|
87
|
+
echo " Gem name: ${GEM_NAME}"
|
|
88
|
+
echo " Module name: ${MODULE_NAME}"
|
|
89
|
+
echo " Temp directory: ${TEMP_OUTPUT_DIR}"
|
|
90
|
+
echo ""
|
|
91
|
+
|
|
92
|
+
# Download OpenAPI Generator CLI JAR if not present
|
|
93
|
+
GENERATOR_JAR="${SCRIPT_DIR}/openapi-generator-cli.jar"
|
|
94
|
+
if [[ ! -f "${GENERATOR_JAR}" ]]; then
|
|
95
|
+
echo "Downloading OpenAPI Generator CLI..."
|
|
96
|
+
curl -L -o "${GENERATOR_JAR}" https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.2.0/openapi-generator-cli-7.2.0.jar
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# Generate SDK using OpenAPI Generator CLI
|
|
100
|
+
java -jar "${GENERATOR_JAR}" generate \
|
|
101
|
+
-i "${OPENAPI_ABSOLUTE_PATH}" \
|
|
102
|
+
-g ruby \
|
|
103
|
+
-o "${TEMP_OUTPUT_DIR}" \
|
|
104
|
+
--additional-properties=gemName="${GEM_NAME}" \
|
|
105
|
+
--additional-properties=moduleName="${MODULE_NAME}" \
|
|
106
|
+
--additional-properties=gemVersion="${OPENAPI_VERSION}" \
|
|
107
|
+
--additional-properties=gemLicense="AGPL-3.0" \
|
|
108
|
+
--additional-properties=gemAuthor="Ufuk Civan Atbas" \
|
|
109
|
+
--additional-properties=gemAuthorEmail="ufuk.civan@fusionauth.io" \
|
|
110
|
+
--additional-properties=gemHomepage="https://permify.co" \
|
|
111
|
+
--additional-properties=gemSummary="Permify is an open source authorization service for creating fine-grained and scalable authorization systems." \
|
|
112
|
+
--additional-properties=gemDescription="Permify is an open source authorization service for creating fine-grained and scalable authorization systems." \
|
|
113
|
+
--skip-validate-spec
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
if [[ $? -ne 0 ]]; then
|
|
117
|
+
echo ""
|
|
118
|
+
echo "❌ Failed to generate Ruby SDK"
|
|
119
|
+
exit 1
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
echo "Updating SDK project directory..."
|
|
123
|
+
|
|
124
|
+
# Copy lib directory
|
|
125
|
+
LIB_DIR="${PROJECT_ROOT}/lib"
|
|
126
|
+
if [[ -d "${TEMP_OUTPUT_DIR}/lib" ]]; then
|
|
127
|
+
echo " Updating ${LIB_DIR}"
|
|
128
|
+
rm -rf "${LIB_DIR}"
|
|
129
|
+
cp -r "${TEMP_OUTPUT_DIR}/lib" "${LIB_DIR}"
|
|
130
|
+
else
|
|
131
|
+
echo "Error: Could not find generated lib directory"
|
|
132
|
+
exit 1
|
|
133
|
+
fi
|
|
134
|
+
|
|
135
|
+
# Copy gemspec file
|
|
136
|
+
if [[ -f "${TEMP_OUTPUT_DIR}/${GEM_NAME}.gemspec" ]]; then
|
|
137
|
+
echo " Updating ${GEM_NAME}.gemspec"
|
|
138
|
+
cp "${TEMP_OUTPUT_DIR}/${GEM_NAME}.gemspec" "${PROJECT_ROOT}/"
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
# Copy other important files
|
|
142
|
+
for file in Gemfile Rakefile README.md .gitignore .rspec; do
|
|
143
|
+
if [[ -f "${TEMP_OUTPUT_DIR}/${file}" ]]; then
|
|
144
|
+
echo " Updating ${file}"
|
|
145
|
+
cp "${TEMP_OUTPUT_DIR}/${file}" "${PROJECT_ROOT}/"
|
|
146
|
+
fi
|
|
147
|
+
done
|
|
148
|
+
|
|
149
|
+
# Copy spec directory if it exists
|
|
150
|
+
if [[ -d "${TEMP_OUTPUT_DIR}/spec" ]]; then
|
|
151
|
+
echo " Updating spec directory"
|
|
152
|
+
rm -rf "${PROJECT_ROOT}/spec"
|
|
153
|
+
cp -r "${TEMP_OUTPUT_DIR}/spec" "${PROJECT_ROOT}/"
|
|
154
|
+
fi
|
|
155
|
+
|
|
156
|
+
echo ""
|
|
157
|
+
echo "✅ Ruby SDK generated and updated at: ${PROJECT_ROOT}"
|
|
Binary file
|