flashbots / relay-specs

MEV-Boost Relay API Specs
https://flashbots.github.io/relay-specs
Creative Commons Zero v1.0 Universal
28 stars 12 forks source link

update API docs to specify how to set content encoding #33

Closed intldds closed 7 months ago

intldds commented 8 months ago

closes #32

let me know if you need me to change/add anything :)

jtraglia commented 7 months ago

Hey @intldds, thanks for the PR! This has an error if you check the linter; see the CI errors. You can fix that problem by putting contentEncoding in a new encoding section, like:

      application/octet-stream:
        schema:
          description: "SSZ serialized request. Use content type header to indicate that SSZ data is contained in the request body."
        encoding:
          contentEncoding: gzip

But then there's another error which I don't really understand. Not sure how to fix:

 51:28  error  oas3-schema  "contentEncoding" property type must be object.  post.requestBody.content.application/octet-stream.encoding.contentEncoding
intldds commented 7 months ago

Thanks for the reply @jtraglia! I've tried following the examples provided here (https://spec.openapis.org/oas/latest.html#considerations-for-file-uploads) and I've tried different combinations to place contentEncoding.

In all of them, when I ran spectral lint relay-oapi.yaml I always received "Property "contentEncoding" is not expected to be here" -- feel free to reject the PR in this case.

jtraglia commented 7 months ago

I can't figure it out either 😭 let's just remove the encoding sections and keep the bullet point.