I've been trying to hit <the version endpoint> on ...
# ory-network
e
I've been trying to hit the version endpoint on my Ory Network project like so but I'm just getting back a 404
Copy code
➜  gists git:(main) ✗ curl -sL \
  --header "Authorization: Bearer $ORY_API_KEY" \
  https://$<http://PROJECT_SLUG.projects.oryapis.com/version|PROJECT_SLUG.projects.oryapis.com/version> | jq
{
  "error": {
    "code": "404",
    "details": {
      "ruleId": "6176b3cb"
    },
    "message": "Invalid path",
    "reason": "No resource found using the specified path.",
    "status": "Not Found"
  }
}
Is there something subtle I'm missing? I can hit other endpoints on that project, which is in "dev" mode.
b
The version endpoint is not exposed, and probably erroneously included in the SDK. What do you need this for?
e
I was having issues with the rust sdk (documented here) and was trying to debug whether it was a versioning issue (thinking that I was perhaps using the wrong version of the sdk)
I see now that it says "Only available when self-hosting this service."
@bland-eye-99092 do you know who is responsible for that rust part of the sdk repo? The fix is simple, but there are a couple of different approaches one might take
If an Ory dev can offer guidance I will create a PR. Just don't want to waste mine or your time with unfavored approach.
b
The SDKs are fully generated at the moment, so unless the fix can be done via configuration of the rust open-api generator, it might be difficult to get even simple fixes done. What would the fix be?
e
This is the fix: https://github.com/ibeckermayer/client-rust/pull/1/files That field that I'm removing there is noted to be redundant and only there for compatibility with an ancient OpenAPI (3.0) whereas you guys are now on 7.12.0. So one option is to revise the OpenAPI spec and just get rid of that redundant field, since apparently OpenAPI's rust generator has a bug in handling this type of structure (see chunleng's comment). That would require releasing as a major version upgrade. Another option is to just add a sed command somewhere around here to patch the generated files.
@bland-eye-99092 it appears my point about 3.0 vs 7.12.0 is a misunderstanding. OpenAPI 3.0 likely refers to the highest level OpenAPI spec version, of which 3.0 is currently widely used. This seems to be a long standing bug in openapi-generator, in fact a previous version of the bug using this struct appears to have been reported back in 2021: https://github.com/OpenAPITools/openapi-generator/issues/9497