Skip to content

Commit

Permalink
fix(definitions): nullable aula.ambiente, turma.ambiente and whoAmI.u…
Browse files Browse the repository at this point in the history
…suario
  • Loading branch information
guesant committed Oct 24, 2024
1 parent 956274f commit e1578e5
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 44 deletions.
8 changes: 8 additions & 0 deletions .changeset/sharp-swans-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@ladesa-ro/especificacao": patch
"@ladesa-ro/especificacao.json-schema": patch
"@ladesa-ro/especificacao.dotnet": patch
"@ladesa-ro/especificacao.definitions": patch
---

fix(definitions): nullable aula.ambiente, turma.ambiente and whoAmI.usuario
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ model AuthRefreshOperation
@entity(Tokens.Auth_WhoAmIResult_View)
model AuthWhoAmIResultView {
/** Usuário autenticado. */
usuario: UsuarioFindOneResultView;
usuario: UsuarioFindOneResultView | null;

/** Vínculos do usuário logado. */
perfisAtivos: PerfilFindOneResultView[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ model AulaView {
...OmitProperties<Aula, "intervaloDeTempo" | "diario" | "ambiente">;
intervaloDeTempo: IntervaloDeTempoFindOneResultView;
diario: DiarioFindOneResultView;
ambiente: AmbienteFindOneResultView;
ambiente: AmbienteFindOneResultView | null;
}

/** Dados de entrada para encontrar uma Aula por ID. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ model Turma {
model TurmaView {
...OmitProperties<Turma, "curso" | "ambientePadraoAula" | "imagemCapa">;
curso: CursoFindOneResultView;
ambientePadraoAula: AmbienteFindOneResultView;
ambientePadraoAula: AmbienteFindOneResultView | null;
imagemCapa: ImagemFindOneResultView | null;
}

Expand Down
40 changes: 19 additions & 21 deletions integrations/dotnet/Ladesa.Dtos/Ladesa.Dtos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1084,13 +1084,13 @@ public partial class BodyBloco
public partial class AmbienteCreateOperationOutput
{
[JsonPropertyName("success")]
public AmbientePadraoAulaElement Success { get; set; }
public AmbientePadraoElement Success { get; set; }
}

/// <summary>
/// Visão FindOne de um ambiente.
/// </summary>
public partial class AmbientePadraoAulaElement
public partial class AmbientePadraoElement
{
[JsonPropertyName("bloco")]
public BlocoElement Bloco { get; set; }
Expand Down Expand Up @@ -1587,7 +1587,7 @@ public partial class FluffyParams
public partial class AmbienteFindOneByIdOperationOutput
{
[JsonPropertyName("success")]
public AmbientePadraoAulaElement Success { get; set; }
public AmbientePadraoElement Success { get; set; }
}

/// <summary>
Expand Down Expand Up @@ -1854,7 +1854,7 @@ public partial class PurpleSuccess
/// Resultados da busca atual.
/// </summary>
[JsonPropertyName("data")]
public AmbientePadraoAulaElement[] Data { get; set; }
public AmbientePadraoElement[] Data { get; set; }

/// <summary>
/// Links da busca.
Expand Down Expand Up @@ -1985,7 +1985,7 @@ public partial class AmbienteListResultView
/// Resultados da busca atual.
/// </summary>
[JsonPropertyName("data")]
public AmbientePadraoAulaElement[] Data { get; set; }
public AmbientePadraoElement[] Data { get; set; }

/// <summary>
/// Links da busca.
Expand Down Expand Up @@ -2113,7 +2113,7 @@ public partial class IndigoParams
public partial class AmbienteUpdateByIdOperationOutput
{
[JsonPropertyName("success")]
public AmbientePadraoAulaElement Success { get; set; }
public AmbientePadraoElement Success { get; set; }
}

/// <summary>
Expand Down Expand Up @@ -2955,7 +2955,7 @@ public partial class AulaCreateOperationOutput
public partial class AulaListResultViewSuccess
{
[JsonPropertyName("ambiente")]
public AmbientePadraoAulaElement Ambiente { get; set; }
public AmbientePadraoElement Ambiente { get; set; }

/// <summary>
/// Data da aula.
Expand Down Expand Up @@ -3006,7 +3006,7 @@ public partial class AulaListResultViewSuccess
public partial class DiarioElement
{
[JsonPropertyName("ambientePadrao")]
public AmbientePadraoAulaElement AmbientePadrao { get; set; }
public AmbientePadraoElement AmbientePadrao { get; set; }

/// <summary>
/// Situação do diário.
Expand Down Expand Up @@ -3202,7 +3202,7 @@ public partial class DisciplinaElement
public partial class TurmaElement
{
[JsonPropertyName("ambientePadraoAula")]
public AmbientePadraoAulaElement AmbientePadraoAula { get; set; }
public AmbientePadraoElement AmbientePadraoAula { get; set; }

[JsonPropertyName("curso")]
public CursoElement Curso { get; set; }
Expand Down Expand Up @@ -3415,7 +3415,7 @@ public partial class AulaFindOneInputView
public partial class AulaFindOneResultView
{
[JsonPropertyName("ambiente")]
public AmbientePadraoAulaElement Ambiente { get; set; }
public AmbientePadraoElement Ambiente { get; set; }

/// <summary>
/// Data da aula.
Expand Down Expand Up @@ -3673,7 +3673,7 @@ public partial class AulaUpdateByIdOperationOutput
public partial class AulaView
{
[JsonPropertyName("ambiente")]
public AmbientePadraoAulaElement Ambiente { get; set; }
public AmbientePadraoElement Ambiente { get; set; }

/// <summary>
/// Data da aula.
Expand Down Expand Up @@ -4077,8 +4077,6 @@ public partial class PerfilElement

/// <summary>
/// Visão FindOne de um Usuário.
///
/// Usuário autenticado.
/// </summary>
public partial class UsuarioElement
{
Expand Down Expand Up @@ -4682,7 +4680,7 @@ public partial class BlocoUpdateByIdOperationOutput
public partial class BlocoView
{
[JsonPropertyName("ambientes")]
public AmbientePadraoAulaElement[] Ambientes { get; set; }
public AmbientePadraoElement[] Ambientes { get; set; }

[JsonPropertyName("campus")]
public CampusElement Campus { get; set; }
Expand Down Expand Up @@ -7414,7 +7412,7 @@ public partial class DiarioFindOneInputView
public partial class DiarioFindOneResultView
{
[JsonPropertyName("ambientePadrao")]
public AmbientePadraoAulaElement AmbientePadrao { get; set; }
public AmbientePadraoElement AmbientePadrao { get; set; }

/// <summary>
/// Situação do diário.
Expand Down Expand Up @@ -8994,7 +8992,7 @@ public partial class DiarioUpdateByIdOperationOutput
public partial class DiarioView
{
[JsonPropertyName("ambientePadrao")]
public AmbientePadraoAulaElement AmbientePadrao { get; set; }
public AmbientePadraoElement AmbientePadrao { get; set; }

/// <summary>
/// Situação do diário.
Expand Down Expand Up @@ -17696,7 +17694,7 @@ public partial class ReservaCreateOperationOutput
public partial class ReservaListResultViewSuccess
{
[JsonPropertyName("ambiente")]
public AmbientePadraoAulaElement Ambiente { get; set; }
public AmbientePadraoElement Ambiente { get; set; }

/// <summary>
/// Data e hora da criação do registro.
Expand Down Expand Up @@ -17829,7 +17827,7 @@ public partial class ReservaFindOneInputView
public partial class ReservaFindOneResultView
{
[JsonPropertyName("ambiente")]
public AmbientePadraoAulaElement Ambiente { get; set; }
public AmbientePadraoElement Ambiente { get; set; }

/// <summary>
/// Data e hora da criação do registro.
Expand Down Expand Up @@ -18155,7 +18153,7 @@ public partial class ReservaUpdateByIdOperationOutput
public partial class ReservaView
{
[JsonPropertyName("ambiente")]
public AmbientePadraoAulaElement Ambiente { get; set; }
public AmbientePadraoElement Ambiente { get; set; }

/// <summary>
/// Data e hora da criação do registro.
Expand Down Expand Up @@ -18823,7 +18821,7 @@ public partial class TurmaFindOneInputView
public partial class TurmaFindOneResultView
{
[JsonPropertyName("ambientePadraoAula")]
public AmbientePadraoAulaElement AmbientePadraoAula { get; set; }
public AmbientePadraoElement AmbientePadraoAula { get; set; }

[JsonPropertyName("curso")]
public CursoElement Curso { get; set; }
Expand Down Expand Up @@ -19166,7 +19164,7 @@ public partial class TurmaUpdateByIdOperationOutput
public partial class TurmaView
{
[JsonPropertyName("ambientePadraoAula")]
public AmbientePadraoAulaElement AmbientePadraoAula { get; set; }
public AmbientePadraoElement AmbientePadraoAula { get; set; }

[JsonPropertyName("curso")]
public CursoElement Curso { get; set; }
Expand Down
9 changes: 8 additions & 1 deletion integrations/json-schema/lib/AulaFindOneResultView.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@
"$ref": "ladesa://schemas/v3/generics/DiarioFindOneResultView.json"
},
"ambiente": {
"$ref": "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json"
"anyOf": [
{
"$ref": "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json"
},
{
"type": "null"
}
]
},
"dateCreated": {
"$ref": "ladesa://schemas/v3/generics/date_time.json",
Expand Down
9 changes: 8 additions & 1 deletion integrations/json-schema/lib/AulaView.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@
"$ref": "ladesa://schemas/v3/generics/DiarioFindOneResultView.json"
},
"ambiente": {
"$ref": "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json"
"anyOf": [
{
"$ref": "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json"
},
{
"type": "null"
}
]
}
},
"required": ["id", "data", "modalidade", "dateCreated", "dateUpdated", "dateDeleted", "intervaloDeTempo", "diario", "ambiente"],
Expand Down
9 changes: 8 additions & 1 deletion integrations/json-schema/lib/AuthWhoAmIResultView.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
"type": "object",
"properties": {
"usuario": {
"$ref": "ladesa://schemas/v3/generics/UsuarioFindOneResultView.json",
"anyOf": [
{
"$ref": "ladesa://schemas/v3/generics/UsuarioFindOneResultView.json"
},
{
"type": "null"
}
],
"description": "Usuário autenticado."
},
"perfisAtivos": {
Expand Down
9 changes: 8 additions & 1 deletion integrations/json-schema/lib/TurmaFindOneResultView.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
"$ref": "ladesa://schemas/v3/generics/CursoFindOneResultView.json"
},
"ambientePadraoAula": {
"$ref": "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json"
"anyOf": [
{
"$ref": "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json"
},
{
"type": "null"
}
]
},
"imagemCapa": {
"anyOf": [
Expand Down
9 changes: 8 additions & 1 deletion integrations/json-schema/lib/TurmaView.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@
"$ref": "ladesa://schemas/v3/generics/CursoFindOneResultView.json"
},
"ambientePadraoAula": {
"$ref": "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json"
"anyOf": [
{
"$ref": "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json"
},
{
"type": "null"
}
]
},
"imagemCapa": {
"anyOf": [
Expand Down
45 changes: 40 additions & 5 deletions integrations/npm/especificacao/src/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,14 @@ export const Nodes: readonly any[] = [
$ref: "ladesa://schemas/v3/generics/CursoFindOneResultView.json",
},
ambientePadraoAula: {
$ref: "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json",
anyOf: [
{
$ref: "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json",
},
{
type: "null",
},
],
},
imagemCapa: {
anyOf: [
Expand Down Expand Up @@ -12779,7 +12786,14 @@ export const Nodes: readonly any[] = [
$ref: "ladesa://schemas/v3/generics/CursoFindOneResultView.json",
},
ambientePadraoAula: {
$ref: "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json",
anyOf: [
{
$ref: "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json",
},
{
type: "null",
},
],
},
imagemCapa: {
anyOf: [
Expand Down Expand Up @@ -14844,7 +14858,14 @@ export const Nodes: readonly any[] = [
$ref: "ladesa://schemas/v3/generics/DiarioFindOneResultView.json",
},
ambiente: {
$ref: "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json",
anyOf: [
{
$ref: "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json",
},
{
type: "null",
},
],
},
dateCreated: {
$ref: "ladesa://schemas/v3/generics/date_time.json",
Expand Down Expand Up @@ -16753,7 +16774,14 @@ export const Nodes: readonly any[] = [
type: "object",
properties: {
usuario: {
$ref: "ladesa://schemas/v3/generics/UsuarioFindOneResultView.json",
anyOf: [
{
$ref: "ladesa://schemas/v3/generics/UsuarioFindOneResultView.json",
},
{
type: "null",
},
],
description: "Usuário autenticado.",
},
perfisAtivos: {
Expand Down Expand Up @@ -17876,7 +17904,14 @@ export const Nodes: readonly any[] = [
$ref: "ladesa://schemas/v3/generics/DiarioFindOneResultView.json",
},
ambiente: {
$ref: "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json",
anyOf: [
{
$ref: "ladesa://schemas/v3/generics/AmbienteFindOneResultView.json",
},
{
type: "null",
},
],
},
},
required: ["id", "data", "modalidade", "dateCreated", "dateUpdated", "dateDeleted", "intervaloDeTempo", "diario", "ambiente"],
Expand Down
Loading

0 comments on commit e1578e5

Please sign in to comment.