Skip to content

Commit

Permalink
Refactor file_utils.go and json-schema.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
haitham911 committed Oct 28, 2024
1 parent a4f2aaf commit f99133d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/utils/file_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ func SearchConfigFile(path string) (string, bool) {
// IsURL checks if a string is a URL
func IsURL(s string) bool {
url, err := url.Parse(s)
if err != nil {
return false
}
validSchemes := []string{"http", "https"}
schemeValid := false
for _, scheme := range validSchemes {
Expand All @@ -206,7 +209,7 @@ func IsURL(s string) bool {
break
}
}
return err == nil && schemeValid
return schemeValid

}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/core-concepts/validate/json-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ schemas:
In the component [manifest](https://github.com/cloudposse/atmos/blob/master/examples/quick-start-advanced/stacks/catalog/vpc/defaults.yaml), add
the `settings.validation` section:
### Specify Remote Schemas
### Use Remote Schemas
You can specify remote schemas by setting the `manifest` field to a remote URL in your `atmos.yaml` configuration file.
<File title="atmos.yaml">
```yaml
Expand Down

0 comments on commit f99133d

Please sign in to comment.