This document describes the relevant changes between releases of the API metamodel.
-
Update to Go 1.17.
-
Update to Ginkgo 2.
-
Update to ANTLR 4.9.3.
-
Update Go dependencies.
-
Simplify installation with
go install
so that it will be possible to install themetamodel
tool with a command like this:go install github.com/openshift-online/ocm-api-metamodel/cmd/[email protected]
- Remove unused imports.
- Check result of
Flush
method. - Cancel poll context.
- Avoid some ineffectual assigments.
- Explicitly use
jsoniter
package selector.
The only functional change in this version is the change from Markdown to AsciiDoc. That is not really relevant because the generated documentation isn't currently published.
In addition to that there also some changes to the development and build workflows:
-
Rename
master
branch tomain
.To adapt your local repository to the new branch name run the following commands:
git branch -m master main git fetch origin git branch -u origin/main main git remote set-head origin -a
-
Rewrite the publish release action in Python.
-
Automatically add changes from
CHANGES.md
to release descriptions.
- Check loops in locator paths.
- Add
Empty
method to builders.
- Add
status
attribute to errors.
- Accept iterator as parameter in
helpers.NewIterator
.
The only change in this release is that the GitHub action that publishes releases has been fixed so that it publishes correct binaries. There are no changes in functionality.
This release doesn't contain any functional changes, it only contains changes in the build process intended to automatically publish the release binaries so that other projects can use them without having to build the project.
- Add
details
attribute to errors.
- Explicitly import
github.com/golang/glog
to avoid conflicts withgithub.com/istio/glog
.
- Add metrics support generator, and remove
X-Metric
header.
- Use Go 1.15
- Add
documentedSupport
andnamedSupport
- Add
typedSupport
- Make reporter streams configurable
- Add presence bitmap
- Update to version 4.8 of Antlr
- Wrap errors
- names: Support numeric initialisms
- json: Support NoContent on POST responses
- Add search method
- Adding List type to checkUpdate validator
- Add Interface type to generator
- pr_check: Lock in dependency versions for test pipeline
- Fix setter for Poll request params
- OpenAPI: Fix expected response
- Update file header year to 2020
-
Add
operation_id
attribute to error objects and error messages.An error object like this:
{ "kind": "Error", "id": "401", "href": "/api/clusters_mgmt/v1/errors/401", "code": "CLUSTERS-MGMT-401", "reason": "My reason", "operation_id": "456" }
Will result in the following error string (in one single line):
identifier is '401', code is 'CLUSTERS-MGMT-401' and operation identifier is '456': My reason
- Run the
gofmt
command only once for all generated files instead of running it once per each generated file. - Avoid generating code with constructs that would then be simplified by the
-s
flag of thegofmt
command.
- Add
Content-Type
to responses sent by the generated server code. - Don't require developer to explicitly remove the
/api
when using the server code. - Remove redundant quotes from error responses sent by the generated server code.
- Fix missing OpenAPI paths due to incorrect use of
append
. - Move code generators to separate packages: one per language.
- Fix generation of OpenAPI paths so that all the characters are lower case.
- Use JSON iterator instead of the default JSON Go package.
- Fix conversion of errors to JSON so that the
kind
attribute is generated correctly.
- Don't fail on wrong kind.
- Add stage URL and
securitySchemes
to the generated OpenAPI specifications.
- Add semantic checks.
- Add support for default values.
- Check default values of paging parameters.
- Add simple conversion from AsciiDoc to Markdown.
- Add support for the version metadata resource.
- Add
Poll
method to clients that have aGet
method.
- Fix imports of
helpers
anderrors
packages.
- Add OpenAPI specification generator.
- Improve parsing of initialisms.
- Fix the method not allowed code.
- Send not found when server returns
nil
target. - Generate service and version servers.
- Don't generate files with execution permission.
- Make HTTP server adapters stateless.
- Generate shorter adapter names.
- Use constants from the
http
package. - Shorter read and write names.
- Rename
SetStatusCode
toStatus
. - Improve naming of variables.
- Set default status.
- Move errors and helpers generators to separate files.
- Use a private model for tests.
- Improve support for maps of objects.
- Keep concepts sorted by name.
- Don't generate empty
const
block for errors. - Add
Copy
method to builders.
- Explicitly enable Go modules so that the build works correctly when the project is located inside the Go path.
- Fix generation of field names for query parameters.
- Remove
query
andpath
fields from request objects. - Remove unused imports.
- Generated servers parse request query arguments.
- Don't install binaries.
- Added new
check
command that loads and checks the model but doesn't generate any code.
- Initial release.