-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
774 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
cargo install postman2openapi-cli | ||
# As go:generate does not support unix pipes, we need to do this here | ||
postman2openapi collection.json > openapi.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,12 @@ | ||
// package main generates a static swagger collection for use in documentation. This differs from collection which dynamically generates a collection for serving. | ||
// this is purely meant for static linking in the repo. | ||
package main | ||
// Package swagger registers the swagger generated spec. | ||
package swagger | ||
|
||
import ( | ||
"github.com/synapsecns/sanguine/services/omnirpc/collection" | ||
"os" | ||
) | ||
import _ "embed" // embed is required for go:embed | ||
|
||
//go:generate go run github.com/synapsecns/sanguine/services/omnirpc/swagger | ||
//go:generate go run github.com/synapsecns/sanguine/services/omnirpc/swagger/generator | ||
//go:generate ./gen.sh | ||
|
||
func main() { | ||
res, err := collection.CreateCollection() | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
file, err := os.Create("collection.json") | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
_, err = file.Write(res) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
// OpenAPI is the openapi specification for the omnirpc service. | ||
// | ||
//go:embed openapi.yaml | ||
var OpenAPI []byte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// package main generates a static swagger collection for use in documentation. This differs from collection which dynamically generates a collection for serving. | ||
// this is purely meant for static linking in the repo. | ||
package main | ||
|
||
import ( | ||
"github.com/synapsecns/sanguine/services/omnirpc/collection" | ||
"os" | ||
) | ||
|
||
func main() { | ||
res, err := collection.CreateCollection() | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
file, err := os.Create("collection.json") | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
_, err = file.Write(res) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} |
Oops, something went wrong.