Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How official API descriptions/definitions can help us with automation #481

Open
andygrunwald opened this issue Aug 20, 2022 · 2 comments
Open
Labels
Milestone

Comments

@andygrunwald
Copy link
Owner

From #200

Using official API descriptions/definitions

Jira provides a machine-readable API description/definition:

Jira Server

The Jira Server platform REST API resources are also documented in this WADL file: jira-rest-plugin.wadl.

Source: https://developer.atlassian.com/server/jira/platform/rest-apis/

Jira Cloud

Source: https://developer.atlassian.com/cloud/jira/platform/rest/v2/

Can we use this to

  • generate API endpoints/structs?
  • validate our code?
  • check how "complete" we are?

Maybe this can be combined with the go generate idea (see #480)

@andygrunwald andygrunwald added this to the Road to v2 milestone Aug 20, 2022
@justinhwang
Copy link

+1 on this, could use a go compiler directive in combination with https://github.com/deepmap/oapi-codegen to autogenerate the structs from the OpenAPI specs. Something like:

//go:generate oapi-codegen --package=main -generate=types -o ./types.gen.go https://developer.atlassian.com/cloud/jira/platform/swagger.v3.json

@andygrunwald
Copy link
Owner Author

Thanks for the recommendation @justinhwang.
I will have a look into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants