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

Additional changes prior to samples #2

Merged
merged 2 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .openapi-generator/templates/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ require '{{{gemName}}}'
Falcon.configure do |config|
config.client_id = "Your_Client_ID"
config.client_secret = "Your_Client_Secret"
config.cloud = "Your_Cloud_Instance"
config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1"
end

# Create a new API instance
Expand Down Expand Up @@ -98,7 +98,7 @@ Welcome aboard the Crimson Falcon! Fly high, code with grace.

## Crimson Falcon API Docs

> :recycle: ***This documentation is automatically generated from the CrowdStrike API specification.*** :recycle:
> :recycle: ***API Docs are automatically generated from the CrowdStrike API specification.*** :recycle:

---
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}
Expand Down
25 changes: 8 additions & 17 deletions .openapi-generator/templates/api_doc.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,13 @@ All URIs are relative to *{{basePath}}*
```ruby
require 'time'
require '{{{gemName}}}'
{{#hasAuthMethods}}
# setup authorization
{{{moduleName}}}.configure do |config|{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}
# Configure HTTP basic authorization: {{{name}}}
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'{{/isBasicBasic}}{{#isBasicBearer}}
# Configure Bearer authorization{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}: {{{name}}}
config.access_token = 'YOUR_BEARER_TOKEN'{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}}
# Configure API key authorization: {{{name}}}
config.api_key['{{{name}}}'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['{{{name}}}'] = 'Bearer'{{/isApiKey}}{{#isOAuth}}
# Configure OAuth2 access token for authorization: {{{name}}}
config.access_token = 'YOUR ACCESS TOKEN'{{/isOAuth}}
{{/authMethods}}end
{{/hasAuthMethods}}

# Setup authorization
Falcon.configure do |config|
config.client_id = "Your_Client_ID"
config.client_secret = "Your_Client_Secret"
config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1"
end

api_instance = {{{moduleName}}}::{{{classname}}}.new
{{^vendorExtensions.x-group-parameters}}
Expand Down Expand Up @@ -121,7 +112,7 @@ This endpoint does not need any parameter.

### Authorization

{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}}
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}**{{name}}**{{^-last}}, {{/-last}}{{/authMethods}}

### HTTP request headers

Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ rebuild: uninstall build install clean
#------------------------
# SDK Generation tasks
#------------------------
.PHONY: build-sdk fix-regex clean-generated-files
.PHONY: build-sdk fix-regex clean-generated-files rubocop

build-sdk:
@echo "Generating SDK..."
Expand All @@ -58,10 +58,14 @@ else # If the operating system is Linux
done
endif

rubocop:
@echo "Running rubocop..."
@rubocop -a

clean-generated-files:
@echo "Cleaning up generated files..."
@rm -rf docs/* lib/crimson-falcon/models/* lib/crimson-falcon/api/* spec/*

.PHONY: generate
generate: clean-generated-files build-sdk fix-regex
generate: clean-generated-files build-sdk fix-regex rubocop
@echo "SDK generated successfully."
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ require 'crimson-falcon'
Falcon.configure do |config|
config.client_id = "Your_Client_ID"
config.client_secret = "Your_Client_Secret"
config.cloud = "Your_Cloud_Instance"
config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1"
end

# Create a new API instance
Expand Down Expand Up @@ -98,7 +98,7 @@ Welcome aboard the Crimson Falcon! Fly high, code with grace.

## Crimson Falcon API Docs

> :recycle: ***This documentation is automatically generated from the CrowdStrike API specification.*** :recycle:
> :recycle: ***API Docs are automatically generated from the CrowdStrike API specification.*** :recycle:

---

Expand Down
40 changes: 24 additions & 16 deletions docs/AlertsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ retrieves all Alerts ids that match a given query
```ruby
require 'time'
require 'crimson-falcon'
# setup authorization

# Setup authorization
Falcon.configure do |config|
# Configure OAuth2 access token for authorization: oauth2
config.access_token = 'YOUR ACCESS TOKEN'
config.client_id = "Your_Client_ID"
config.client_secret = "Your_Client_Secret"
config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1"
end

api_instance = Falcon::AlertsApi.new
Expand Down Expand Up @@ -79,7 +81,7 @@ end

### Authorization

[oauth2](../README.md#oauth2)
**oauth2**

### HTTP request headers

Expand All @@ -98,10 +100,12 @@ Perform actions on detections identified by detection ID(s) in request. Each act
```ruby
require 'time'
require 'crimson-falcon'
# setup authorization

# Setup authorization
Falcon.configure do |config|
# Configure OAuth2 access token for authorization: oauth2
config.access_token = 'YOUR ACCESS TOKEN'
config.client_id = "Your_Client_ID"
config.client_secret = "Your_Client_Secret"
config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1"
end

api_instance = Falcon::AlertsApi.new
Expand Down Expand Up @@ -146,7 +150,7 @@ end

### Authorization

[oauth2](../README.md#oauth2)
**oauth2**

### HTTP request headers

Expand All @@ -165,10 +169,12 @@ retrieves aggregates for Alerts across all CIDs
```ruby
require 'time'
require 'crimson-falcon'
# setup authorization

# Setup authorization
Falcon.configure do |config|
# Configure OAuth2 access token for authorization: oauth2
config.access_token = 'YOUR ACCESS TOKEN'
config.client_id = "Your_Client_ID"
config.client_secret = "Your_Client_Secret"
config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1"
end

api_instance = Falcon::AlertsApi.new
Expand Down Expand Up @@ -213,7 +219,7 @@ end

### Authorization

[oauth2](../README.md#oauth2)
**oauth2**

### HTTP request headers

Expand All @@ -232,10 +238,12 @@ retrieves all Alerts given their ids
```ruby
require 'time'
require 'crimson-falcon'
# setup authorization

# Setup authorization
Falcon.configure do |config|
# Configure OAuth2 access token for authorization: oauth2
config.access_token = 'YOUR ACCESS TOKEN'
config.client_id = "Your_Client_ID"
config.client_secret = "Your_Client_Secret"
config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1"
end

api_instance = Falcon::AlertsApi.new
Expand Down Expand Up @@ -280,7 +288,7 @@ end

### Authorization

[oauth2](../README.md#oauth2)
**oauth2**

### HTTP request headers

Expand Down
Loading