我有一个使用supabase/postgres(t) 的rest api,它生成它自己的OpenAPI/Swagger 定义。问题是这仅包含 id 字段,但不包含对其他表的实际引用。
因此,当使用 openapi-generator 生成客户端时,类仅包含外键,而不包含实际的对象引用。
有没有办法生成带有引用的 openapi 定义,以便我可以带有引用生成我的类?
{
"swagger": "2.0",
"info": {
"description": "standard public schema",
"title": "PostgREST API",
"version": "9.0.0.20220211 (pre-release) (dcf7ade)"
},
"host": "localhost:3000",
"basePath": "/",
"schemes": [
"http"
],
"consumes": [
"application/json",
"application/vnd.pgrst.object+json",
"text/csv"
],
"produces": [
"application/json",
"application/vnd.pgrst.object+json",
"text/csv"
],
"paths": {
"/": {
"get": {
"tags": [
"Introspection"
],
"summary": "OpenAPI description (this document)",
"produces": [
"application/openapi+json",
"application/json"
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/hallo": …Run Code Online (Sandbox Code Playgroud)