Summary

Write OpenAPI 3.x specifications for the HTTP API endpoints smartnode v2 currently uses.

Required Milestones

Milestone A - Initial OpenAPI Specification Integration

Payout: $500

  • Start small- write a spec for a single endpoint and complete the migration of that entire endpoint/client. Add CI jobs to ensure that the generated code is always ‘fresh’ on merge.
  • Add additional endpoints one by one until they are all migrated to spec-driven.
  • Confine all the generated code to a single go package that only contains generated code.
  • All HTTP endpoints and client code should be through the generated interfaces.
  • A OpenAPI spec has been added and its generated code is being used by one API endpoint.
  • A script has been added that runs codegen.
  • A Github Actions CI job has been added and verifies that re-running codegen produces no diff.
  • Generate middleware using https://github.com/deepmap/oapi-codegen.
  • Migrate Smart Node v2’s raw HTTP serving to use the generated code instead.

Milestone B - Complete OpenAPI Specification Implementation

**Payout: ** $3,000

  • All API endpoints are in the spec
  • All API endpoints and client code uses generated interfaces.

Further Notes

  • Recommend familiarity with Golang, OpenAPI/Swagger, the HTTP protocol, and REST principles.
  • This is not a good first bounty. It will be very difficult if it is your first contribution.

Verification

  • Smart Node’s current maintainers can confirm completion.

Resources

Contacts

GMC Administrator - ShfRyn
Support - Patches