44 contact :
55 name : Support
66 url : https://support.contrivedservice.contrivedprovider.com/contact
7- paths :
8- /repos/{owner}/{repo}/pages :
9- get :
10- summary : Get a Pages site
11- servers :
12- - url : ' {protocol}://{origin:^(?:[^\:/]+(?:\:[0-9]+)?|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+(?:\:[0-9]+)?)$}/'
13- variables :
14- protocol :
15- default : https
16- enum :
17- - https
18- - http
19- origin :
20- default : pages.contrivedservice.contrivedprovider.com
21- operationId : contrivedservice/get-pages
22- parameters :
23- - $ref : ' #/components/parameters/owner'
24- - $ref : ' #/components/parameters/repo'
25- responses :
26- ' 200 ' :
27- description : Response
28- content :
29- application/json :
30- schema :
31- $ref : ' #/components/schemas/page'
32- ' 404 ' :
33- $ref : ' #/components/responses/not_found'
7+ paths : {}
348components :
359 schemas :
3610 basic-error :
@@ -46,6 +20,26 @@ components:
4620 type : string
4721 status :
4822 type : string
23+ cert_display :
24+ title : Key Display
25+ type : object
26+ properties :
27+ type :
28+ type : string
29+ description : The key type
30+ example : x509
31+ not_before :
32+ type : string
33+ description : Textual date representation of the key's not before date.
34+ example : Mar 22 02:50:46 2025 GMT
35+ not_after :
36+ type : string
37+ description : Textual date representation of the key's not after date.
38+ example : Mar 22 02:50:46 2025 GMT
39+ public_key_algorithm :
40+ type : string
41+ description : The public key algorithm used by the key.
42+ example : rsaEncryption
4943 page :
5044 type : object
5145 properties :
@@ -191,22 +185,49 @@ resources:
191185 description : |
192186 Describe an x509 certificate.
193187 Classical usage:
194- openssl x509 -in test/server/mtls/credentials/pg_server_cert.pem -noout -text
195- operation :
196- inline :
197- - ' {{ or .parameters.executable "openssl" }}'
198- - x509
199- - -in
200- - ' {{ .parameters.cert_file }}'
201- - -noout
202- - -text
188+ openssl x509 -in test/tmp/cert.pem -noout -text
189+ inline :
190+ - ' {{ or .parameters.executable "openssl" }}'
191+ - x509
192+ - -in
193+ - ' {{ .parameters.cert_file }}'
194+ - -noout
195+ - -text
203196 parameters :
204197 cert_file :
205198 in : inline
206199 required : true
207200 response :
208- mediaType : application/json
209- openAPIDocKey : ' 200'
201+ schema_override :
202+ title : Key Display
203+ type : object
204+ properties :
205+ type :
206+ type : string
207+ description : The key type
208+ example : x509
209+ not_before :
210+ type : string
211+ description : Textual date representation of the key's not before date.
212+ example : Mar 22 02:50:46 2025 GMT
213+ not_after :
214+ type : string
215+ description : Textual date representation of the key's not after date.
216+ example : Mar 22 02:50:46 2025 GMT
217+ public_key_algorithm :
218+ type : string
219+ description : The public key algorithm used by the key.
220+ example : rsaEncryption
221+ transform :
222+ body : >
223+ {{- $s := separator ", " -}}
224+ {{- $root := . -}}
225+ {{- $pubKeyAlgo := getRegexpFirstMatch $root "Public Key Algorithm: (?<anything>.*)" -}}
226+ {{- $notBefore := getRegexpFirstMatch $root "Not Before: (.*)" -}}
227+ {{- $notAfter := getRegexpFirstMatch $root "Not After(?:[ ]*): (.*)" -}}
228+ { "type": "x509", "public_key_algorithm": "{{ $pubKeyAlgo }}", "not_before": "{{ $notBefore }}", "not_after": "{{ $notAfter }}"}
229+ type : ' golang_template_v0.1.0'
230+
210231 rsa :
211232 id : openssl_local.keys.rsa
212233 name : rsa
@@ -218,19 +239,18 @@ resources:
218239 Create a new RSA key pair.
219240 Classical usage:
220241 openssl req -x509 -keyout test/server/mtls/credentials/pg_server_key.pem -out test/server/mtls/credentials/pg_server_cert.pem -config test/server/mtls/openssl.cnf -days 365
221- operation :
222- inline :
223- - ' {{ or .parameters.executable "openssl" }}'
224- - req
225- - -x509
226- - -keyout
227- - ' {{ .parameters.key_out_file }}'
228- - -out
229- - ' {{ .parameters.cert_out_file }}'
230- - -config
231- - ' {{ .parameters.config_file }}'
232- - -days
233- - ' {{ or .parameters.days 365 }}'
242+ inline :
243+ - ' {{ or .parameters.executable "openssl" }}'
244+ - req
245+ - -x509
246+ - -keyout
247+ - ' {{ .parameters.key_out_file }}'
248+ - -out
249+ - ' {{ .parameters.cert_out_file }}'
250+ - -config
251+ - ' {{ .parameters.config_file }}'
252+ - -days
253+ - ' {{ or .parameters.days 365 }}'
234254 parameters :
235255 key_out_file :
236256 in : inline
0 commit comments