첫 커밋: 로컬 프로젝트 업로드
This commit is contained in:
commit
6a8dbeb2e9
1211 files changed
+312864
No files matched your search
@@ -0,0 +1,41 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func TestOpenAPIDocumentsExternalAPIs(t *testing.T) {
|
||||
data, err := os.ReadFile("../../docs/openapi.yaml")
|
||||
require.NoError(t, err)
|
||||
spec := string(data)
|
||||
var parsed map[string]any
|
||||
require.NoError(t, yaml.Unmarshal(data, &parsed))
|
||||
|
||||
required := []string{
|
||||
"/.well-known/baron-rp-manifest.json:",
|
||||
"/.well-known/baron-rp-manifest.schema.json:",
|
||||
"/api/v1/public/orgchart:",
|
||||
"/api/v1/tenants/registration:",
|
||||
"/api/v1/integrations/org-context:",
|
||||
"/api/v1/admin/api-keys:",
|
||||
"/api/v1/admin/api-keys/{id}:",
|
||||
"/api/v1/admin/api-keys/{id}/secret/rotate:",
|
||||
"ApiKeyUpdateScopesRequest:",
|
||||
"BaronApiKeyId:",
|
||||
"BaronApiKeySecret:",
|
||||
"X-Baron-Key-ID",
|
||||
"X-Baron-Key-Secret",
|
||||
"API Key 인증이 필요한 요청의 header에 자동으로 포함됩니다.",
|
||||
"OrgContextResponse:",
|
||||
}
|
||||
for _, expected := range required {
|
||||
require.Contains(t, spec, expected)
|
||||
}
|
||||
|
||||
require.False(t, strings.Contains(spec, "/api/v1/orgfront/org-context:"))
|
||||
}
|
||||
Reference in new issue
Block a user