codeconsole commented on PR #16275:
URL: https://github.com/apache/grails-core/pull/16275#issuecomment-5836522255
@matrei thanks for the second round. It's addressed at 47140f06d7, one
commit per item. The exception is splitting out `NavigableMapPropertySource`:
as @jdaugherty suggested, it stays in this PR. Section 74 of the upgrade notes
covers it, and the PR description lists it under "Changes outside the module".
**`NavigableMapPropertySource`**
- Nit: b56b3f5226. An empty object, an empty list or a `null` inside a list
of objects is now presented as `""` under its own name, as Spring's YAML
flattening does (`app.empty[0]: ""`). Section 74 says so, and also mentions a
mixed list such as `[a, {b: 1}]`.
**Follow-ups**
1. 92eb41e3d4: a mapping that takes the controller and an optional action
from the path, the default mapping included, is described at `GET
/<controller>` for the default action. The guide lists it.
2. 5350a324b4: where `responseFormats` is a map, each action is decided by
its own entry. It is read the way `RestResponder.calculateFormats` reads it: a
`List`, or a `List` per action. `respond` doesn't treat a `String[]` as
declared formats either, and answers in every configured format, `html`
included, so the description treats it as undeclared too. The guide says so.
3. d5505943d1: in 3.0, a `$ref` property that needs a sibling becomes
`allOf: [$ref]` carrying it. That covers nullable, `readOnly` (from `bindable:
false` or a command getter without a setter), and the description, deprecation
or access mode from `@Schema`. swagger-core has dropped the `@Schema` siblings
by then, so they are read back from the property's annotation.
4. a006d6a500: every class a Grails operation uses is described by its bean
property names, including one an `@ApiResponse` names. `@Schema(name)` still
renames it.
5. 6dbc85b685: the limitation now covers `defaultScope: prototype` and the
non-generic `super(Book)` case, and a test pins both.
**New findings**
- 6, 8, 9. 5ebb9625ad:
- Outside a Grails description, the converter now passes a type through
unchanged. springdoc's own endpoints are therefore described as springdoc alone
would describe them, so a domain class only a Spring endpoint returns keeps its
transient getter and its full association.
- An `OpenApiBuilderCustomizer` starts a per-thread record at the start of
each springdoc build, of the class resolved under each name, and the Grails
contribution takes that record.
- A class a Grails endpoint also uses replaces springdoc's schema with the
Grails one, so both refer to one schema (@jdaugherty's earlier point). A class
that only shares the name is qualified, in that document only.
- The converter bean is the stateless `INSTANCE`, so the global list holds
nothing of an application context.
- Asserted on `/v3/api-docs/shelf` and `/v3/api-docs/legacy` in the
example app, including your `legacy.Book` ordering case.
- 7. 2871014d56: where the document already has a `ValidationErrors` that
the base document didn't declare, the Grails errors are described as
`grails.validation.ValidationErrors`.
- 10. dfa7ab0559: each class a controller extends is kept with
`INVOKE_DECLARED_METHODS` and `ACCESS_DECLARED_FIELDS`, and described types
with `ACCESS_DECLARED_FIELDS`.
- 11. 5e3a7c073c: characters a file name cannot hold are written as `-`
(`openapi-admin-v1.yaml`). Where two groups would map to one file, the command
writes nothing and names both.
- 12. Nits:
- 9be6293bbf: a group that already carries the Grails customizer is
skipped, so the actuator resource adds none.
- 1fe197062c: `DocumentSelectionSpec` no longer implements `ActionHooks`.
Its filter and customizer cases now run through springdoc's
`OpenApiMethodFilter` and `OperationCustomizer`.
- 5ebb9625ad: `OpenApiGrailsPluginSpec` no longer touches `INSTANCE`,
`register()` or the swagger singleton. The converter behavior, including its
ordering against an application's own converter, is asserted on `/v3/api-docs`
in the example app.
- The guide notes that a schema an `OperationCustomizer` adds keeps its
name and isn't named apart.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]