Skip to content

Commit faa0405

Browse files
authored
f(IL): add testnet endpoint (#45)
1 parent 45a6dea commit faa0405

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

api/design/api_server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ var _ = API("PriceOracle", func() {
1616
URI("https://k8s.mainnet.eu.price-oracle.injective.network")
1717
})
1818
Host("testnet", func() {
19+
URI("https://k8s.testnet.price-oracle.injective.network")
20+
})
21+
Host("staging-mainnet", func() {
1922
URI("https://k8s.mainnet.staging.price-oracle.injective.network")
2023
})
2124
})

api/gen/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"api":{"name":"PriceOracle","title":"PriceOracle Service","description":"HTTP server for the Price Oracle API","servers":{"PriceOracle":{"name":"PriceOracle","services":["Injective Price Oracle API","Swagger","health"],"hosts":{"mainnet":{"name":"mainnet","server":"PriceOracle","uris":["https://k8s.mainnet.eu.price-oracle.injective.network","grpc://localhost:8080"]},"testnet":{"name":"testnet","server":"PriceOracle","uris":["https://k8s.mainnet.staging.price-oracle.injective.network","grpc://localhost:8080"]}}}}},"services":{"Injective Price Oracle API":{"name":"Injective Price Oracle API","description":"Injective-Price-Oracle services API doc","methods":{"probe":{"name":"probe","description":"Validate TOML file","payload":{"type":{"$ref":"#/definitions/ProbePayload","required":["content"]},"example":{"content":"RG9sb3JlIGV0IHNlZCBtb2xlc3RpYXMgZXN0IGxhdWRhbnRpdW0gaXBzdW0u","key":"Consequatur quod expedita quisquam eaque perspiciatis."}},"result":{"type":{"$ref":"#/definitions/ProbeResponse"},"example":{"result":"Dolorem est qui voluptas amet."}},"requirements":[{"schemes":[{"type":"APIKey","name":"","in":"","scheme":"api_key"}],"scopes":null}]}}},"Swagger":{"name":"Swagger","description":"The API Swagger specification"},"health":{"name":"health","description":"HealthAPI allows to check if backend data is up-to-date and reliable or not.","methods":{"GetStatus":{"name":"GetStatus","description":"Get current backend health status","result":{"type":{"$ref":"#/definitions/HealthStatusResponse"},"example":{"data":{},"errmsg":"Something has failed","s":"error","status":"Consequatur ea voluptatem in."}}}}}},"definitions":{"Error":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"HealthGetStatusInternalResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Internal Server Error (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"HealthGetStatusResponseBody":{"title":"HealthGetStatusResponseBody","type":"object","properties":{"data":{"$ref":"#/definitions/HealthStatusResponseBody"},"errmsg":{"type":"string","description":"Error message.","example":"Something has failed"},"s":{"type":"string","description":"Status of the response.","example":"error","enum":["ok","error","no_data"]},"status":{"type":"string","example":"Est ut consequatur."}},"example":{"data":{},"errmsg":"Something has failed","s":"error","status":"Non dolor rerum."},"required":["s","status"]},"HealthStatus":{"title":"HealthStatus","type":"object","description":"Status defines the structure for health information","example":{}},"HealthStatusResponse":{"title":"HealthStatusResponse","type":"object","properties":{"data":{"$ref":"#/definitions/HealthStatus"},"errmsg":{"type":"string","description":"Error message.","example":"Something has failed"},"s":{"type":"string","description":"Status of the response.","example":"error","enum":["ok","error","no_data"]},"status":{"type":"string","example":"Amet ducimus quaerat."}},"example":{"data":{},"errmsg":"Something has failed","s":"error","status":"Temporibus eum occaecati."},"required":["s","status"]},"HealthStatusResponseBody":{"title":"HealthStatusResponseBody","type":"object","description":"Status defines the structure for health information","example":{}},"InjectivePriceOracleAPIProbeInternalResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Internal Server Error (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"InjectivePriceOracleAPIProbeInvalidArgResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Invalid argument (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"InjectivePriceOracleAPIProbeRequestBody":{"title":"InjectivePriceOracleAPIProbeRequestBody","type":"object","properties":{"content":{"type":"string","description":"TOML file contents","example":"TW9sZXN0aWFzIHV0IHByYWVzZW50aXVtIHBvcnJvIG5vbiBzaW50IG5lc2NpdW50Lg==","format":"byte"}},"example":{"content":"RG9sb3JlbXF1ZSBxdWlhIHNlZCBlb3Mu"},"required":["content"]},"InjectivePriceOracleAPIProbeResponseBody":{"title":"InjectivePriceOracleAPIProbeResponseBody","type":"object","properties":{"result":{"type":"string","description":"Result of the probe","example":"Ea corrupti."}},"example":{"result":"Inventore non explicabo cumque possimus molestiae enim."},"required":["result"]},"InjectivePriceOracleAPIProbeUnauthorizedResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Unauthorized (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"ProbePayload":{"title":"ProbePayload","type":"object","properties":{"content":{"type":"string","description":"TOML file contents","example":"Q29uc2VxdWF0dXIgZXQgZXQgaXBzYW0u","format":"byte"},"key":{"type":"string","description":"API key for authentication","example":"Impedit aliquid ab."}},"example":{"content":"RXQgZWEgaW1wZWRpdCBuYXR1cyB2aXRhZSBlYXF1ZS4=","key":"Ut repudiandae cumque labore hic."},"required":["content"]},"ProbeResponse":{"title":"ProbeResponse","type":"object","properties":{"result":{"type":"string","description":"Result of the probe","example":"Totam illum cumque."}},"example":{"result":"Illum perferendis id doloribus."},"required":["result"]}}}
1+
{"api":{"name":"PriceOracle","title":"PriceOracle Service","description":"HTTP server for the Price Oracle API","servers":{"PriceOracle":{"name":"PriceOracle","services":["Injective Price Oracle API","Swagger","health"],"hosts":{"mainnet":{"name":"mainnet","server":"PriceOracle","uris":["https://k8s.mainnet.eu.price-oracle.injective.network","grpc://localhost:8080"]},"staging-mainnet":{"name":"staging-mainnet","server":"PriceOracle","uris":["https://k8s.mainnet.staging.price-oracle.injective.network","grpc://localhost:8080"]},"testnet":{"name":"testnet","server":"PriceOracle","uris":["https://k8s.testnet.price-oracle.injective.network","grpc://localhost:8080"]}}}}},"services":{"Injective Price Oracle API":{"name":"Injective Price Oracle API","description":"Injective-Price-Oracle services API doc","methods":{"probe":{"name":"probe","description":"Validate TOML file","payload":{"type":{"$ref":"#/definitions/ProbePayload","required":["content"]},"example":{"content":"RG9sb3JlIGV0IHNlZCBtb2xlc3RpYXMgZXN0IGxhdWRhbnRpdW0gaXBzdW0u","key":"Consequatur quod expedita quisquam eaque perspiciatis."}},"result":{"type":{"$ref":"#/definitions/ProbeResponse"},"example":{"result":"Dolorem est qui voluptas amet."}},"requirements":[{"schemes":[{"type":"APIKey","name":"","in":"","scheme":"api_key"}],"scopes":null}]}}},"Swagger":{"name":"Swagger","description":"The API Swagger specification"},"health":{"name":"health","description":"HealthAPI allows to check if backend data is up-to-date and reliable or not.","methods":{"GetStatus":{"name":"GetStatus","description":"Get current backend health status","result":{"type":{"$ref":"#/definitions/HealthStatusResponse"},"example":{"data":{},"errmsg":"Something has failed","s":"error","status":"Consequatur ea voluptatem in."}}}}}},"definitions":{"Error":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Error response result type (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"HealthGetStatusInternalResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Internal Server Error (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"HealthGetStatusResponseBody":{"title":"HealthGetStatusResponseBody","type":"object","properties":{"data":{"$ref":"#/definitions/HealthStatusResponseBody"},"errmsg":{"type":"string","description":"Error message.","example":"Something has failed"},"s":{"type":"string","description":"Status of the response.","example":"error","enum":["ok","error","no_data"]},"status":{"type":"string","example":"Est ut consequatur."}},"example":{"data":{},"errmsg":"Something has failed","s":"error","status":"Non dolor rerum."},"required":["s","status"]},"HealthStatus":{"title":"HealthStatus","type":"object","description":"Status defines the structure for health information","example":{}},"HealthStatusResponse":{"title":"HealthStatusResponse","type":"object","properties":{"data":{"$ref":"#/definitions/HealthStatus"},"errmsg":{"type":"string","description":"Error message.","example":"Something has failed"},"s":{"type":"string","description":"Status of the response.","example":"error","enum":["ok","error","no_data"]},"status":{"type":"string","example":"Amet ducimus quaerat."}},"example":{"data":{},"errmsg":"Something has failed","s":"error","status":"Temporibus eum occaecati."},"required":["s","status"]},"HealthStatusResponseBody":{"title":"HealthStatusResponseBody","type":"object","description":"Status defines the structure for health information","example":{}},"InjectivePriceOracleAPIProbeInternalResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Internal Server Error (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"InjectivePriceOracleAPIProbeInvalidArgResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"Invalid argument (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"InjectivePriceOracleAPIProbeRequestBody":{"title":"InjectivePriceOracleAPIProbeRequestBody","type":"object","properties":{"content":{"type":"string","description":"TOML file contents","example":"TW9sZXN0aWFzIHV0IHByYWVzZW50aXVtIHBvcnJvIG5vbiBzaW50IG5lc2NpdW50Lg==","format":"byte"}},"example":{"content":"RG9sb3JlbXF1ZSBxdWlhIHNlZCBlb3Mu"},"required":["content"]},"InjectivePriceOracleAPIProbeResponseBody":{"title":"InjectivePriceOracleAPIProbeResponseBody","type":"object","properties":{"result":{"type":"string","description":"Result of the probe","example":"Ea corrupti."}},"example":{"result":"Inventore non explicabo cumque possimus molestiae enim."},"required":["result"]},"InjectivePriceOracleAPIProbeUnauthorizedResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"Unauthorized (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"ProbePayload":{"title":"ProbePayload","type":"object","properties":{"content":{"type":"string","description":"TOML file contents","example":"Q29uc2VxdWF0dXIgZXQgZXQgaXBzYW0u","format":"byte"},"key":{"type":"string","description":"API key for authentication","example":"Impedit aliquid ab."}},"example":{"content":"RXQgZWEgaW1wZWRpdCBuYXR1cyB2aXRhZSBlYXF1ZS4=","key":"Ut repudiandae cumque labore hic."},"required":["content"]},"ProbeResponse":{"title":"ProbeResponse","type":"object","properties":{"result":{"type":"string","description":"Result of the probe","example":"Totam illum cumque."}},"example":{"result":"Illum perferendis id doloribus."},"required":["result"]}}}

0 commit comments

Comments
 (0)