-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(drs): add autogenerated models #70
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis PR adds autogenerated DRS (Data Repository Service) client models to the codebase. The models are generated from the OpenAPI specification version 1.4.0 and include all necessary data structures for interacting with a DRS service. The implementation follows Rust's standard practices for serializable data models using serde. Class diagram for the new DRS modelsclassDiagram
class DrsObject {
+String id
+Option<String> name
+String self_uri
+i64 size
+String created_time
+Option<String> updated_time
+Option<String> version
+Option<String> mime_type
+Vec<Checksum> checksums
+Option<Vec<AccessMethod>> access_methods
+Option<Vec<ContentsObject>> contents
+Option<String> description
+Option<Vec<String>> aliases
+new(String id, String self_uri, i64 size, String created_time, Vec<Checksum> checksums)
}
class AccessMethod {
+Type type
+Option<Box<AccessMethodAccessUrl>> access_url
+Option<String> access_id
+Option<String> region
+Option<bool> available
+Option<Box<AccessMethodAuthorizations>> authorizations
+new(Type type)
}
class GetServiceInfo200Response {
+String id
+String name
+Box<DrsServiceType> type
+Option<String> description
+Box<ServiceOrganization> organization
+Option<String> contact_url
+Option<String> documentation_url
+Option<String> created_at
+Option<String> updated_at
+Option<String> environment
+String version
+i32 max_bulk_request_length
+new(String id, String name, DrsServiceType type, ServiceOrganization organization, String version, i32 max_bulk_request_length)
}
class Service {
+String id
+String name
+Box<ServiceType> type
+Option<String> description
+Box<ServiceOrganization> organization
+Option<String> contact_url
+Option<String> documentation_url
+Option<String> created_at
+Option<String> updated_at
+Option<String> environment
+String version
+new(String id, String name, ServiceType type, ServiceOrganization organization, String version)
}
class AccessMethodAuthorizations {
+Option<String> drs_object_id
+Option<Vec<SupportedTypes>> supported_types
+Option<Vec<String>> passport_auth_issuers
+Option<Vec<String>> bearer_auth_issuers
+new()
}
class Authorizations {
+Option<String> drs_object_id
+Option<Vec<SupportedTypes>> supported_types
+Option<Vec<String>> passport_auth_issuers
+Option<Vec<String>> bearer_auth_issuers
+new()
}
class BulkAccessUrl {
+Option<String> drs_object_id
+Option<String> drs_access_id
+String url
+Option<Vec<String>> headers
+new(String url)
}
class ServiceOrganization {
+String name
+String url
+new(String name, String url)
}
class Checksum {
+String checksum
+String type
+new(String checksum, String type)
}
class AccessMethodAccessUrl {
+String url
+Option<Vec<String>> headers
+new(String url)
}
class AccessUrl {
+String url
+Option<Vec<String>> headers
+new(String url)
}
class ContentsObject {
+String name
+Option<String> id
+Option<Vec<String>> drs_uri
+Option<Vec<ContentsObject>> contents
+new(String name)
}
class DrsServiceType {
+Artifact artifact
+new(Artifact artifact)
}
class ServiceType {
+String group
+String artifact
+String version
+new(String group, String artifact, String version)
}
class Summary {
+Option<i32> requested
+Option<i32> resolved
+Option<i32> unresolved
+new()
}
class Error {
+Option<String> msg
+Option<i32> status_code
+new()
}
class GetBulkAccessUrl200Response {
+Option<Box<Summary>> summary
+Option<Vec<UnresolvedInner>> unresolved_drs_objects
+Option<Vec<BulkAccessUrl>> resolved_drs_object_access_urls
+new()
}
class GetBulkObjects200Response {
+Option<Box<Summary>> summary
+Option<Vec<UnresolvedInner>> unresolved_drs_objects
+Option<Vec<DrsObject>> resolved_drs_object
+new()
}
class OptionsBulkObject200Response {
+Option<Box<Summary>> summary
+Option<Vec<UnresolvedInner>> unresolved_drs_objects
+Option<Vec<Authorizations>> resolved_drs_object
+new()
}
class UnresolvedInner {
+Option<i32> error_code
+Option<Vec<String>> object_ids
+new()
}
class PostAccessUrlRequest {
+Option<Vec<String>> passports
+new()
}
class PostObjectRequest {
+Option<bool> expand
+Option<Vec<String>> passports
+new()
}
class DrsService {
+i32 max_bulk_request_length
+Box<DrsServiceType> type
+new(i32 max_bulk_request_length, DrsServiceType type)
}
class DrsServiceType {
+Artifact artifact
+new(Artifact artifact)
}
class Artifact {
<<enumeration>>
Drs
}
class SupportedTypes {
<<enumeration>>
None
BasicAuth
BearerAuth
PassportAuth
}
class Type {
<<enumeration>>
S3
Gs
Ftp
Gsiftp
Globus
Htsget
Https
File
}
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @lilachic - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding documentation comments explaining what DRS (Data Repository Service) is and how these models are auto-generated from the OpenAPI spec. This would help future contributors understand the context and purpose of this code.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Fixes https://github.com/orgs/elixir-cloud-aai/projects/23/views/1?filterQuery=&pane=issue&itemId=85797382&issue=elixir-cloud-aai%7Cga4gh-sdk%7C55 .
Added:
lib/src/clients/drs
Added:
lib/src/clients/drs/mod.rs
Modified:
./lib/src/clients/mod.rs
to containd drs module.Autogenerated:
lib/src/clients/drs/models/*.rs
Summary by Sourcery
New Features: