Skip to content

Commit a862ae7

Browse files
committed
more ai generation progress
1 parent 0276f6a commit a862ae7

10 files changed

Lines changed: 423 additions & 47 deletions

docs/js/app.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ document.addEventListener('DOMContentLoaded', function () {
227227
SwaggerUIBundle.SwaggerUIStandalonePreset
228228
],
229229
layout: "BaseLayout",
230-
supportedSubmitMethods: [], // Disable Try it out feature
230+
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'], // Enable Try it out
231+
tryItOutEnabled: true,
232+
defaultModelsExpandDepth: 1,
233+
defaultModelExpandDepth: 1,
234+
displayRequestDuration: true,
231235
requestSnippetsEnabled: true,
232236
requestSnippets: {
233237
generators: {
@@ -236,10 +240,12 @@ document.addEventListener('DOMContentLoaded', function () {
236240
syntax: 'bash',
237241
fn: (req) => {
238242
try {
243+
// console.log('Generating cURL snippet for:', req);
239244
const har = requestToHar(req);
240245
const snippet = new HTTPSnippet(har);
241246
return snippet.convert('shell', 'curl');
242247
} catch (e) {
248+
console.error('cURL generation failed:', e);
243249
return 'curl command generation failed';
244250
}
245251
}
@@ -253,6 +259,7 @@ document.addEventListener('DOMContentLoaded', function () {
253259
const snippet = new HTTPSnippet(har);
254260
return snippet.convert('python', 'requests');
255261
} catch (e) {
262+
console.error('Python generation failed:', e);
256263
return '# Python snippet generation failed';
257264
}
258265
}
@@ -266,6 +273,7 @@ document.addEventListener('DOMContentLoaded', function () {
266273
const snippet = new HTTPSnippet(har);
267274
return snippet.convert('javascript', 'fetch');
268275
} catch (e) {
276+
console.error('JavaScript generation failed:', e);
269277
return '// JavaScript snippet generation failed';
270278
}
271279
}

docs/openapi/download-endpoints.yaml

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ info:
33
title: "SynBioHub Download API"
44
version: "1.0.0"
55
description: "API endpoints for downloading content from SynBioHub in various formats"
6-
6+
77
servers:
8-
- url: 'https://synbiohub.org'
8+
- url: "https://synbiohub.org"
99
description: Main SynBioHub instance
10-
- url: 'http://localhost:7777'
10+
- url: "http://localhost:7777"
1111
description: Local development instance
1212

1313
components:
@@ -49,15 +49,20 @@ paths:
4949
- userToken: []
5050
- {}
5151
responses:
52-
'200':
52+
"200":
5353
description: SBOL document
5454
content:
5555
application/rdf+xml:
5656
schema:
5757
type: string
58-
'403':
58+
example: |
59+
<?xml version="1.0" encoding="UTF-8"?>
60+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sbol="http://sbols.org/v2#">
61+
<!-- SBOL RDF content -->
62+
</rdf:RDF>
63+
"403":
5964
description: Not authorized to access this object
60-
'404':
65+
"404":
6166
description: Object not found
6267
tags:
6368
- Download
@@ -89,15 +94,20 @@ paths:
8994
- userToken: []
9095
- {}
9196
responses:
92-
'200':
97+
"200":
9398
description: SBOL document (non-recursive)
9499
content:
95100
application/rdf+xml:
96101
schema:
97102
type: string
98-
'403':
103+
example: |
104+
<?xml version="1.0" encoding="UTF-8"?>
105+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sbol="http://sbols.org/v2#">
106+
<!-- SBOL RDF content (non-recursive) -->
107+
</rdf:RDF>
108+
"403":
99109
description: Not authorized to access this object
100-
'404':
110+
"404":
101111
description: Object not found
102112
tags:
103113
- Download
@@ -129,15 +139,15 @@ paths:
129139
- userToken: []
130140
- {}
131141
responses:
132-
'200':
142+
"200":
133143
description: Metadata in JSON format
134144
content:
135145
application/json:
136146
schema:
137147
type: object
138-
'403':
148+
"403":
139149
description: Not authorized to access this object
140-
'404':
150+
"404":
141151
description: Object not found
142152
tags:
143153
- Download
@@ -169,15 +179,15 @@ paths:
169179
- userToken: []
170180
- {}
171181
responses:
172-
'200':
182+
"200":
173183
description: GenBank file
174184
content:
175185
text/plain:
176186
schema:
177187
type: string
178-
'403':
188+
"403":
179189
description: Not authorized to access this object
180-
'404':
190+
"404":
181191
description: Object not found
182192
tags:
183193
- Download
@@ -209,15 +219,15 @@ paths:
209219
- userToken: []
210220
- {}
211221
responses:
212-
'200':
222+
"200":
213223
description: FASTA file
214224
content:
215225
text/plain:
216226
schema:
217227
type: string
218-
'403':
228+
"403":
219229
description: Not authorized to access this object
220-
'404':
230+
"404":
221231
description: Object not found
222232
tags:
223233
- Download
@@ -249,15 +259,15 @@ paths:
249259
- userToken: []
250260
- {}
251261
responses:
252-
'200':
262+
"200":
253263
description: GFF3 file
254264
content:
255265
text/plain:
256266
schema:
257267
type: string
258-
'403':
268+
"403":
259269
description: Not authorized to access this object
260-
'404':
270+
"404":
261271
description: Object not found
262272
tags:
263273
- Download

docs/openapi/download-plugin.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
openapi: 3.0.0
2+
info:
3+
title: SynBioHub Download Plugin API
4+
description: API specification for SynBioHub download plugin endpoints
5+
version: 1.0.0
6+
paths:
7+
/status:
8+
get:
9+
summary: Plugin Status
10+
description: Checks if the plugin is operational.
11+
responses:
12+
"200":
13+
description: Plugin is running
14+
content:
15+
text/plain:
16+
schema:
17+
type: string
18+
example: "The plugin is up and running"
19+
20+
/evaluate:
21+
post:
22+
summary: Evaluate Request
23+
description: Determines if the plugin can handle the request.
24+
requestBody:
25+
required: true
26+
content:
27+
application/json:
28+
schema:
29+
type: object
30+
properties:
31+
type:
32+
type: string
33+
description: The type of object to be processed
34+
url:
35+
type: string
36+
description: The URL of the object
37+
responses:
38+
"200":
39+
description: Plugin can handle the request
40+
"415":
41+
description: Plugin cannot handle the request
42+
43+
/run:
44+
post:
45+
summary: Run Plugin
46+
description: Executes the download plugin.
47+
requestBody:
48+
required: true
49+
content:
50+
application/json:
51+
schema:
52+
type: object
53+
properties:
54+
url:
55+
type: string
56+
description: The URL of the object to download
57+
complete_sbol:
58+
type: string
59+
description: URL to the complete SBOL of the object
60+
responses:
61+
"200":
62+
description: File download
63+
content:
64+
application/octet-stream:
65+
schema:
66+
type: string
67+
format: binary
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
openapi: 3.0.0
2+
info:
3+
title: SynBioHub Mail and Plugin Configuration API
4+
description: API endpoints for managing mail settings and plugins in SynBioHub
5+
version: 1.0.0
6+
paths: {}

docs/openapi/plugin-template.yaml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
openapi: 3.0.0
2+
info:
3+
title: SynBioHub Plugin Template
4+
description: >
5+
A generic template for creating SynBioHub plugins.
6+
All plugins must implement the 'status', 'evaluate', and 'run' endpoints.
7+
Customize the request and response schemas of 'evaluate' and 'run' based on the specific plugin type (Download, Visualization, Submission, etc.).
8+
version: 1.0.0
9+
servers:
10+
- url: "http://localhost:5000"
11+
description: Local development server
12+
13+
paths:
14+
/status:
15+
get:
16+
summary: Plugin Status
17+
description: >
18+
Checks if the plugin is operational.
19+
SynBioHub polls this endpoint to verify the plugin is up.
20+
responses:
21+
"200":
22+
description: Plugin is running
23+
content:
24+
text/plain:
25+
schema:
26+
type: string
27+
example: "The plugin is up and running"
28+
29+
/evaluate:
30+
post:
31+
summary: Evaluate Request
32+
description: >
33+
Determines if the plugin can handle the incoming request.
34+
SynBioHub sends metadata about the object or file to this endpoint.
35+
Return 200 if the plugin can process it, or 415 if it cannot.
36+
requestBody:
37+
required: true
38+
content:
39+
application/json:
40+
schema:
41+
type: object
42+
properties:
43+
type:
44+
type: string
45+
description: The RDF type of the object (e.g., ComponentDefinition, Collection)
46+
url:
47+
type: string
48+
description: The URL of the object in SynBioHub
49+
filename:
50+
type: string
51+
description: Name of the file (for submission plugins)
52+
responses:
53+
"200":
54+
description: Plugin can handle the request
55+
"415":
56+
description: Plugin cannot handle the request
57+
58+
/run:
59+
post:
60+
summary: Run Plugin
61+
description: >
62+
Executes the plugin logic.
63+
SynBioHub sends the actual data or location of the data to this endpoint.
64+
requestBody:
65+
required: true
66+
content:
67+
application/json:
68+
schema:
69+
type: object
70+
properties:
71+
url:
72+
type: string
73+
description: The URL of the object
74+
complete_sbol:
75+
type: string
76+
description: URL to fetch the complete SBOL data
77+
params:
78+
type: object
79+
description: Any additional parameters passed from the frontend
80+
multipart/form-data:
81+
schema:
82+
type: object
83+
properties:
84+
file:
85+
type: string
86+
format: binary
87+
description: The uploaded file (for submission plugins)
88+
params:
89+
type: object
90+
description: Any additional parameters
91+
responses:
92+
"200":
93+
description: Plugin execution successful
94+
content:
95+
application/json:
96+
schema:
97+
type: object
98+
description: JSON response (e.g., for submission plugins)
99+
text/html:
100+
schema:
101+
type: string
102+
description: HTML content (for visualization plugins)
103+
application/octet-stream:
104+
schema:
105+
type: string
106+
format: binary
107+
description: File download (for download plugins)
108+
"400":
109+
description: Bad Request
110+
"500":
111+
description: Internal Server Error

docs/openapi/search-endpoints.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,17 @@ paths:
6767
type: string
6868
version:
6969
type: string
70+
example:
71+
- uri: "https://synbiohub.org/public/igem/BBa_K1404008/1"
72+
name: "BBa_K1404008"
73+
description: "p70-CsgA-His*2, double His-tagged curli generator"
74+
displayId: "BBa_K1404008"
75+
version: "1"
76+
- uri: "https://synbiohub.org/public/igem/BBa_K1404009/1"
77+
name: "BBa_K1404009"
78+
description: "CsgA, curli monomer"
79+
displayId: "BBa_K1404009"
80+
version: "1"
7081
tags:
7182
- Search
7283

0 commit comments

Comments
 (0)